You are not logged in.
I've been reading up on pacman at the arch wiki on how to properly clean my cache and found out that this can usually be done with pacman -Scc. However, whenever I run the command, it tells me it cleans the directory ( /var/cache/pacman/pkg/ ), but I still see a ton of files in there. Am I not doing something correctly to purge these?
I also tried sudo paccache -rk1
How can I completely get rid of these leftover files?
Last edited by scatherinch (2023-04-20 11:49:59)
Offline
paccache -rk1 will leave something over by definition, -Scc shouldn't, which left over files are you referring to exactly? Output of ls -l /var/cache/pacman/pkg/ ?
Offline
Here you go!:
-rw-r--r-- 1 root root 9055875 Apr 6 22:40 dolphin-emu-1:5.0.r18498.46b99671d9-2-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root 566 Apr 6 10:04 dolphin-emu-1:5.0.r18498.46b99671d9-2-x86_64.pkg.tar.zst.sig
-rw-r--r-- 1 root root 36623 Apr 20 01:06 libwbclient-4.18.2-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root 310 Apr 20 01:06 libwbclient-4.18.2-1-x86_64.pkg.tar.zst.sig
-rw-r--r-- 1 root root 49638 Apr 16 22:34 pacman-contrib-1.9.0-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root 566 Apr 16 22:34 pacman-contrib-1.9.0-1-x86_64.pkg.tar.zst.sig
-rw-r--r-- 1 root root 7083232 Apr 20 01:07 smbclient-4.18.2-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root 310 Apr 20 01:07 smbclient-4.18.2-1-x86_64.pkg.tar.zst.sigLast edited by scatherinch (2023-04-20 10:43:49)
Offline
That's not "a ton of files", all of those are the current version of the respective packages, if this is after you ran paccache -rk1 but you installed them after pacman -Scc then this is the completely expected result. paccache -rk1 keeps 1 version of any given package.
Offline
Oh, I deleted the original folder after I realized there was quite a bit of bloat in there after I did a new installation.
I do understand what you're saying and I read that in the wiki, but I suppose what I'm trying to ask is if there there's a way to remove the contents of this folder from the cli without having to delete the folder again. I simply like to keep my system tidy and organized to keep up with my regular cleaning rituals when I power my system down.
Last edited by scatherinch (2023-04-20 11:13:23)
Offline
paccache -rk0 will remove everything and leave you with a blank /var/cache/pacman/pkg folder.
Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.
Offline
Ah, thank you, @kermit63! That certainly did the trick and now I have a fresh cache! For some reason I thought it would be more difficult than that.
Offline
You don't need a seperate tool for that goal - just `rm /var/cache/pacman/pkg/*`
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
You can also set up a paccache systemd-timer or pacman hook to automate cleaning the cache.
systemctl enable --now paccache.timerwill setup paccache -rk3 to run every three days. You can locate the paccache.service file to adjust this to your needs.
Offline