This installation of arch is 2 years old at this point and there’s nothing wrong with it and I want to do a clean reinstall to feel more fresh. But I’ve been constantly delaying it for a long time because I’m scared breaking something and also not having my laptop fully functional for even a day isn’t a pleasant thought.
The benefits I think is being able to handpick which files I want to keep and which packages I would reinstall since the thought of how many files and packages are left over from when I momentarily needed them is really unpleasent. But this habit of reinstalling the OS as a cleanup method might be a bad one I’ve brought myself from the time I used windows which was justified back then but it may no longer be here since I can achieve what I want with a much more simple and less risky method
So am I being an idiot here? Or should I go for it?
Edit: I do have bleachbit but the benefit of a reinstall is that only system files, essential packages and my personal files are kept (actually copied out, formatted and copied back in for my files). These two aren’t the same
Edit 2: Thank you everyone for their answers, it’s clear that I don’t have that much reason to wipe my system at the moment. It might be a better learning experience to look for orphan files and packages
I often go through this:
https://wiki.archlinux.org/title/Pacman/Tips_and_tricks
You can quickly remove all unused packages with this command: (from the article above)
pacman -Qdtq | pacman -Rns -
My arch install is many years old, I don’t feel the need to re-install.
My arch install is 10 years old at this point.
I would be interested to know what inspired the need to “feel fresh” from OP. Is this an extremely underpowered laptop that just can’t handle having a few extra packages installed? Is it the Windows bad habit just making them perceive it as “needing a cleanup” ?
If you have hard drive space, unloaded packages are generally never loaded and just take up storage, not CPU/memory (though you should check to see what services are running too).
Also importantly.
pacman -Qdtq
andpacman -Rns
are 2 separate commands. “Qdtq” means “Query, dependencies, unrequired, quiet” (“quiet” makes it so just the package names are output, to be more neatly piped into the second command. This queries the unrequired dependencies (ie, packages that were installed along with another package, but are no longer used by another package), and lists them “Rns” means “Remove, no backup, recursively” . and the-
at the end means “Use the values from the first half of the pipe”… This removes the packages listed, skips creating any.pacsave
fields for config files, and then once the package is removed, checks all of ITS dependencies to see if they can be removed as well.For this command, a “dependency” is any package that is installed as a dependency of another package (and hasn’t been directly installed manually). If you installed package X, and it brought in package Y and package Z, then uninstalled package X, and now youre worried about package Y and Z, this will find them and clear them out.
This also teaches us that if you uninstalled package X with
pacman -Rs packageX
, thes
bit would make sure that package Y and Z were cleaned up at removal time in the first place.But overall, there’s very little reason to reinstall arch unless you are running out of disk space due to how many obsolete packages you have hanging around and they are all explicitly installed so wont be cleaned up with the above method.
But worst case, if you manage to break things just by clearing out unused dependencies, you can just copy your files off and do a full reinstall. Your system works right now, why reinstall? Might as well try to improve it a little bit (if thats even needed) before giving up and starting over.
I guess it is better to spend some little time cleaning up your existing install than doing a fresh one. From what you describe, you just have some leftover configuration files you can delete.
Fresh installs is needed when you messed up your current install with broken packages or missing ones or missing configuration and you just don’t know how to clean it up.
So as long as you can clean up your install, just clean it.
I agree and clicked to say the same thing, until I read “I’m scared of breaking something” - if you want to get good at Linux, then do what you’re scared of, and break things, because that is how you learn.
If you do not want to - which is 100% perfectly fine and acceptable - not everyone has to be a Linux expert and some people do just want to use it - then I wouldn’t bother unless there is a specific need.
Just want to add, before doing anything make sure you have backups that you have tested before doing what you’re scared of!
It should make it easier not to be scared and you can always revert if you do end up breaking something.
If this guy follows the rabbit hole he’ll soon be using NixOS with Impermanence and wiping to a clean setup every reboot.
Having a single file config simplifies backups and that’s tempting but I don’t want to lose the arch wiki (I know some info is general to Linux but some isn’t), AUR and other stuff that I miss once I lose it to an even more niche OS. I can try it on a virtual machine at some point
I hear you. No distro has anything compared to Arch’s wiki, and NixOS’ documentation is currently mixed at best. For what it’s worth, NixOS’ package repository is comparable to the AUR. I have yet to run into anything I use on AUR that isn’t available in the official NixOS package repository.
I reinstall my system almost every 5 months, idk why but seeing my system has more than 1200+ packages installed it bugging me so much so I wipe everything and reinstall