You are not logged in.
Hi, Due to pacman's caching for all packages, Im lazy enough to run pacman -Sc so i created a hook :
^^>>> cat /etc/pacman.d/hooks/clean_package_cache.hook 05:56:31
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
Exec = /usr/bin/pacman -Sc --noconfirmNow after every transaction it says :
:: Running post-transaction hooks...
(1/3) Reloading system manager configuration...
(2/3) Arming ConditionNeedsUpdate...
(3/3) Cleaning pacman cache...
error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
if you're sure a package manager is not already
running, you can remove /var/lib/pacman/db.lck
error: command failed to execute correctlyThere is an error line which says cant lock the database, which is right ! pacman is in use, so it cant be used again before it's lock get deleted
The nasty way of doing this could be deleting the lockfile manually in the command, But im looking for better solution, what do you do for clearing pacman's package cache ?
Last edited by erfanjoker (2020-12-23 04:13:47)
Offline
A little search in the wiki won't harm you..
https://wiki.archlinux.org/index.php/Pa … kage_cache
Offline
A little search in the wiki won't harm you..
https://wiki.archlinux.org/index.php/Pa … kage_cache
Thanks a lot
Offline