A Complete Idiot's Guide To Endeavour OS Maintenance / Update / Upgrade

There are no candidates to prune. Since I have never run that before, the question is, who or what is doing the pruning presently?

I like your rigorous checklist, but how how about a pre-checklist where the Welcome or other settings may already be doing some of this stuff?


1 Like

@fbodymechanic I am confused between usage of paccache -r and sudo pacman -Sc. What should be the better methodology to follow ?

1 Like

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.


They do very different things, I would use whichever one you need.

And I made this guide for those who don’t really know. It’s a starting point. This may not be what you want to follow.

1 Like

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.



➤ 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

➤ paccache -r
==> no candidate packages found for pruning

Hence, I preferred the first one. Please correct me If I went wrong.

1 Like

That is because pacman -Sc is much more aggressive so running paccache -r after it will never have anything to prune.

See my explanation above yours for more details.


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 ?

1 Like

Because it doesn’t remove all of them. As described above it retains “only the current version of packages installed”.

If you want to literally empty the cache you can use pacman -Scc


This is the command about which I was not aware of. Now I will jot down this command in my notes for future usage.
Thank you for teaching me.


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.

1 Like

Yes sir, I developed the same feeling from this :

As the word “literally” was used here, hence I felt that the command shared can be dangerous to use !! :grimacing:

1 Like

Also, should I need to to use pacman -Rns $(pacman -Qdtq) even after I had used pacman -Sc ?

1 Like

Try it and see what you get? Look at the differences that pacman gives you if there is any.

1 Like

I got this,

➤ pacman -Rns $(pacman -Qdtq)
fish: $(...) is not supported. In fish, please use '(pacman)'.
pacman -Rns $(pacman -Qdtq)

After changing a bit :

➤ sudo pacman -Rns '(pacman -Qdtq)'
[sudo] password for deweshk: 
error: target not found: (pacman -Qdtq)

But :

➤ sudo pacman -Qdtq

Why like this ?

1 Like


1 Like

Or you letting pamac clean the cache for you. :wink:

These are radically different things.

The package cache is just copies of the files which were downloaded from the repos. It isn’t the packages that are installed in your system.

Cleaning orphans removes packages that are actually installed on your system.

1 Like

Thanks for clarification. But I want to know what mistake I made during its execution because of which it didn’t executed ?

1 Like

It is because that is a bash command and you are using fish.

Try this in fish:

 pacman -Rns (pacman -Qdtq)
1 Like

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.