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.
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).
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.