It’s always good to learn these commands as they apply to a terminal. Yes there are ways I’d doing this via the handy welcome app. It is really intended to get you started. Otherwise you are just clicking a button without knowing what that button is actually doing to your system.
Either you have the paccache timer enabled or your install isn’t old enough to more have more than 3 versions of any packages.
Those are totally different commands.
paccache -r - Cleans the package cache by retaining the last 3 versions of anything in the cache
pacman -Sc - Cleans the package cache by retaining only the current version of packages installed
Personally, I would use paccache -r if you can afford the disk space. It is nice to be able to locally downgrade a package if the new package breaks something.
deweshk@HomeDesktop:~
➤ sudo pacman -Sc
[sudo] password for deweshk:
Packages to keep:
All locally installed packages
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove all other packages from cache? [Y/n]
removing old packages from cache...
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
When first time I used this command, I noticed that this command targets the cache directory to remove unused things. To verify this at that time I also used paccache -r to see the results, but its output was
deweshk@HomeDesktop:~
➤ paccache -r
==> no candidate packages found for pruning
Hence, I preferred the first one. Please correct me If I went wrong.
Sir, one doubt which I found now is that, even after using the aggressive move, I can still see used space in /var/cache/pacman/ via FileLight. why is this so ?
Just make sure you understand exactly what it does and the consequences of having a perfectly clean cache all the time.
If you have an update and need to downgrade - you’ve got nothing to fall back on.
It’s your computer not mine, but I like saving 3 backups. And I think it’s wise for people just starting out, which is why it’s not included in my guide.
Actually it’s not really my guide. It’s basically just the arch wiki with clarification and notes and a little bit for the eos mirrors for the most part.
Pro tip - some the things I posted can be set to timers so you don’t actually have to do them. But as Endeavour is to be a starting point and you build your system, if you’d like to include or setup things like automatic journal trimming or cache trimming - you are welcome to set them up! Peruse the links I provide to the wiki if you’d like and if you need more help - create a thread and we can help you. I don’t want to add more of it here.