I was just wondering if there is any recommended system maintenance to consider / do with an Arch Based distro like EndevourOS.
I mostly thinking about simple stuff like everyone once in a while run yay -Yc to clean up unused dependencies. That’s really the only maintenance I know about, so there must be more things I should do.
I would love to hear more such recommendations that I should add to my monthly system maintenance day. E.G. folders to backup, files that should be backed up, terminal commands, things that can and should be automated, etc.
It is more a personal preference thing about how often to do it. If you aren’t tight on disk space, I wouldn’t se any reason to do it more often than once per month.
Having cache can be very handy, it allows you downgrade packages easily and re-install them without having to download them again.
I remember at the beginning of my Arch career (lol), I accidentally removed Network Manager and was left with my network not working. I wish I knew there’s such thing as pacman cache… Had to learn how to set up my network by other means, it was a nice experience after all
The cache is in /var/cache/pacman/pkg. To reinstall or downgrade something you can simply do sudo pacman -U /var/cache/pacman/pkg/package.tar.xz.
If you want to downgrade you just choose an older version (that’s why it is useful to keep some “old” cache).
Thanks to both of you for this information. The longer I stay on this forum, the more I learn. This is by far the best forum in which I have ever participated. Everyone here is most helpful.
The thought just occurred to me: if I downgrade using either of these methods, will they downgrade everything that can be downgraded or just what I want (or need to be) downgraded?
The latter. If you do it manually via pacman -U, you point it at a single package. If you do it via downgrade, you actually would type downgrade packagename.
That being said, be aware that downgrading packages is inherently risky no matter how you do it. Downgrade the wrong package and your system might not boot.
The problem with the cache is that Arch never trims it by default. At all.
So you can actually fill up your drive with 50 copies of every package.
Now, I auto-clean my cache so it always keep one backup copy of every upgraded package. Very rarely you will ever need to downgrade more than one version. And if you do, I also run daily backups with Timeshift so…
I just made an alias. A lot of people create pacman hooks and what not but an alias is just must simplier. I use Fish shell so the actual creation of the alias is a bit different but here are the commands it runs, automatic first refreshing the mirror list, rank mirror list, update, update AUR then trim. First the alias that refreshes the mirror and then the alias that combine that with the trimming (basically having an Alias call and Alias):
This is the alias “update”; first it runs the alias mirrors above, combine it with a pacman and yay complete system upgrade (I know yay can do it all, but…) and then the last command trims the paccache.
The -rk flag determins how many backup copies are saved. Default, if you don’t use the flag, it saves 3. That seems exsessive to me so I run it with the -rk 2 to only keep one backup.
No, it means it keeps one additional copy. From the Arch wiki:
"You can also define how many recent versions you want to keep. To retain only one past version use: