Ask HN: Arch Users – What is your long-term system maintenance routine?
Hi Community,
been a happy Arch Linux user for many years, keeping up with minimal system maintenance and occasionally performing some package cleanups (using commands like pacman -Qtd).
I'm curious about your long-term system maintenance routines. What steps do you take to ensure your system stays stable and up-to-date, and how long have you managed to keep your system running smoothly without needing to reinstall?
Thanks for your insights!
33 comments
[ 6.3 ms ] story [ 105 ms ] thread> To list all packages no longer required as dependencies (orphans):
[0] https://wiki.archlinux.org/title/Pacman`pacman -R -` will read names from stdin
Of course all's in the wiki, some useful links:
https://wiki.archlinux.org/title/System_maintenance https://wiki.archlinux.org/title/Pacman/Tips_and_tricks
Quite a few years back I just started a bash script that stays in my dot files repo, that has all the base packages and configuration in it that I need for a new system. When it's time for a fresh install, I can run that script and have 95% of my system set up. I even include gnome settings and stuff in there using the CLI tools.
But for that to work, we desperately need a different POSIX incompatible filesystem structure, because /etc/ has to become /local/etc or something like that.
/usr/local is theoretically there but on most distributions /sbin and others are just symbolic links these days, so they are pretty much pointless.
>how long have you managed to keep your system running smoothly without needing to reinstall?
I'm baffled as to how someone could be a happy user of a system that requires regular reinstalls to be usable/stable.
Is it that installing Arch is itself a hobby for some people?
> a system that requires regular reinstalls to be usable/stable.
Windows 95, 98 and XP were like that, no? Those have been the standard business operating system over the years.
I'm not sure that being on par with a 30-year old operating system is much of an accolade.
Windows sucked back then, it's just that it sucked less than DOS.
Were you actually using Windows back in those days? Absolutely nobody loved or defended them. We used them because we had to, not because they were good.
When that laptop died I swapped the HDD into a loaner from a friend, only to swap it into a new laptop I bought a few months later.
When I grew tired of the HDD's speed, and could afford to, I bought a SATA SSD and cloned the HDD onto it.
When I upgraded to a more powerful laptop a few years ago, it didn't come with a SATA bay, so I cloned the SSD from my old laptop onto the NVMe SSD of the new one. Today, I run both laptops; the old one as a home server and backup and the new one as my main computer. Both run Arch on Wayland and KDE 6. The same Arch I installed back in 2012 with KDE 3.
Beyond that: `pacman -Rsnc` is my "yeet" command. Check the dependent packages carefully. Safer to run this regularly to avoid a build up.
I use `paru` for an AUR helper. Cache cleared manually but could probably be automated too.
I have been running the same install for a couple years and despite my early Linux ignorance and complete abuse of my desktop by experimenting with everything I've only ever had one failed Grub boot that wasn't my own fault.
This is in my config.fish file:
The only maintenance I do is for btrfs, which I learned the hard way one year after running the system without caring.
It's just a regular `btrfs balance` to ensure the system never run out of metadata space.
Other than that, just `pacman -Syu` and `flatpak update` whenever I feel like I want to.
I rarely clean Pacman's cache because I've been through some cases that I needed to downgrade some packages, and I always uninstall with `pacman -Rs`, so no leftover dependencies. And anything that `paru` installs as build dependencies, I uninstall right after.
Once in a year or two the update breaks and I have to read up the news section of archlinux.org, but it's usually not a big deal, fixable within minutes.
Haven't had to do much, really. Just regular package updates (including AUR ones) and cleanup of stale packages. The main laptop gets updates applied frequently, but the backup only once every six months / a year, except security updates (e.g., ssh, OpenSSL, the recent xz backdoor was a no-op because I hadn't ever updated the backup to a vulnerable version). Then there was the KDE 6 release recently.
Every once in a while I go through the list of every package installed and see if I should remove any. This is a no-op for most packages, since they are usually mandatory dependencies of another package, but there's always some packages I'd installed for some limited purpose that no longer applies.
I've cleaned up dead config files a few times. Especially around KDE major version updates. Not that it took up too much space or broke anything; just that I didn't want those files around.
I've kept around a bootable USB key for emergencies, but now that I think about it, I'm surprised I've never had to use it for a system rescue. There was that one time I changed my password and promptly forgot the new one. But it's been such a long time since I've used it.
Other than that pacman -Syu every couple of weeks.
I'm probably going to start using paccache.
I've never had an arch system explode on me. I've had Debian systems do that. Using arch has been smooth sailing for me for the most part.
Thanks for posing this question, as it should prove instructive.