Skip to main content
Topic: Annual clean installs (Read 1193 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Annual clean installs

So I have a philosophy about how to do Linux right. I'm a daily user, literally 100% of my work is done on a Linux laptop--my writing, personal and commercial, photo editing, retro gaming, and so on. And I have come to be a firm believer in formatting the root file system once in a while, so to speak. I think the reliable way to clean up a Linux system is to reinstall it.

I was taught by two old Unix guys, my grandfather, who'd used aging PDP's for molecular analysis at USM back in the early 80's, and my uncle, who was a Vax sysop for Haliburton around the same time. One thing they had a peculiar insistence on was that /home should never be on the root partition. In my early Linux days, running Ubuntu 12 and 13 as a kid and messing around in Python and Bash, I never manually partitioned a drive. My grandfather did that for me, and he knew how to set up a dual boot with Windows much better than I do now.  Now my grandfather is... well, he doesn't talk much sense these days, and I caught him about to delete system files off the last laptop the university issued him before he lost his job. He thought they were a virus.

But I caught on eventually. Arch tutorials told me that there were vague reasons to use a separate home partition. I had thought it was just tradition: old Unix systems had two "winchesters." One was for the root partition, one was to store the large home directories of potentially dozens of users. But there's another reason: for you to regularly reinstall your system files.

This morning I had a few hours to kill before work, and I'd had this on my chest for a while. My Arch system on my laptop was getting bloated. Too many programs I wasn't using. I was using an AUR helper that doesn't do cleanup of compile-time dependencies, for one thing. And key programs I was using from the AUR were deprecated. Also, I wanted to get systemd out of my life.

So I wrote down all the programs I'd need to reproduce my existing desktop setup (i3-gaps, pcmanfm, and so on) and then backed up my home partition to a spare HDD, and over the course of two hours installed Artix completely fresh on the root partition. By the end of the second hour I had my entire setup restored, but over Artix instead of Arch, with none of the bloat.

Next year about this time, I'm going to reinstall Artix freshly. If I don't think to reinstall a program, I probably don't need it taking up space on my hard drive. Think of it like a sort of cyber-Marie Kondo method.

Does anyone else do fresh installs on about a yearly basis?
My family motto: Nonnumquam enim non erramus, or loosely translated, "Sometimes we don't screw up."

Re: Annual clean installs

Reply #1
I personally don't really see the need to do a full re-install on my system. I will occasionally do some "spring cleaning" by combing through pacman -Qe to see if there's anything I haven't really used recently and I'll uninstall that, but I do use most of the packages I install anyway, so I don't really delete more than 5-10 at a time.

As to having a separate / and /home partition, the main benefits are, in my view, it's more robust in the case of drive failures (mainly HDDs where you have data on physical locations on the disk that can get damaged) and it allows you to put your installed programs and stored files on separate physical drives.

For example on my desktop I have Artix installed to a small-ish NVMe drive and my home partition with all my files (many of which are several gigabytes in size) on a standard SSD (which is much cheaper per $ of storage).


That's not to say of course you have to do any of those things, they're just nice benefits.

Do you find you get any real performance enhancement out of a fresh re-install? Or is it more a psychological "cleaning your room" type effect?

Re: Annual clean installs

Reply #2


As to having a separate / and /home partition, the main benefits are, in my view, it's more robust in the case of drive failures (mainly HDDs where you have data on physical locations on the disk that can get damaged) and it allows you to put your installed programs and stored files on separate physical drives.

For example on my desktop I have Artix installed to a small-ish NVMe drive and my home partition with all my files (many of which are several gigabytes in size) on a standard SSD (which is much cheaper per $ of storage).


That's not to say of course you have to do any of those things, they're just nice benefits.

Do you find you get any real performance enhancement out of a fresh re-install? Or is it more a psychological "cleaning your room" type effect?

Well, my daily driver and desktop are, respectively, an ultra-thinline Lenovo laptop and an old Asus All-in-One PC. Neither have room for two physical drives. My laptop can't even fit a thick laptop HDD! FWIW I have a terabyte SSD in it, which I don't trust as far as I could throw it; I back everything up regularly. I suppose the use of an SSD nixes some of the traditional benefits of two partitions.

As for performance increase, well, Artix seems to be eating less memory when running my desktop programs than Arch was, but there are so many uncontrolled variables that I would hardly draw any conclusions from these two data points. I do think I reclaimed gigs and gigs of drive space, though as to the actual benefits... perhaps more psychological than anything. I like to be able to look at my system files and have some idea what any given thing is there for... I suppose there's some practical value in not having a bunch of junk around with no clue what it's doing or what its purpose is.

You know, we have a pretty raw deal with technology these days. When I was born a PC had a single-core CPU, was lucky if it connected to a DSL line without additional hardware, and the web was basically an anarchic society where world governments had little sway. These days the internet is corporate and gets more regulated by the US government every day, whether the rest of the world asked or not, and even our processors have secure enclaves within them that run separate operating systems m which monitor system memory for "security" reasons. There's something to be said for wanting more control over what's on your hard drive, if only as your one act of rebellion against a system that, otherwise, has the chokehold on your technology.

Still, I think there are practical benefits. One is that you get more practice at installing your system, which is always a good skill for a tech person to have. Another is, as I mentioned, that there's fewer unknowns to deal with. The more minimal a system is, the easier problems are to diagnose. "There have always been ghosts in the machine..."
My family motto: Nonnumquam enim non erramus, or loosely translated, "Sometimes we don't screw up."

Re: Annual clean installs

Reply #3
"Annual fresh installs" are a Windows thing. The registry accumulates over time to the point of considerably slowing down everything, and uninstalling programs can leave files behind.

I never reinstalled Artix on both my desktop and laptop, nor had the need to. It just works.

 

Re: Annual clean installs

Reply #4
"Annual fresh installs" are a Windows thing. The registry accumulates over time to the point of considerably slowing down everything, and uninstalling programs can leave files behind.

I never reinstalled Artix on both my desktop and laptop, nor had the need to. It just works.
The fact that the problem is worse on Windows doesn't take away from the fact that, on most computer systems, some junk accumulates over time.

Aside from being useful I also find it kind of fun...
My family motto: Nonnumquam enim non erramus, or loosely translated, "Sometimes we don't screw up."

Re: Annual clean installs

Reply #5
The fact that the problem is worse on Windows doesn't take away from the fact that, on most computer systems, some junk accumulates over time.
If you mean logs, there is logrotate. For pacman cache, there is paccache which can be scheduled, for example, using cron. Otherwise, please explain.

Re: Annual clean installs

Reply #6
Love the read OP I agree with everything not even 1 "if" or "but" or "why" :) and whenever possible I'm always placing /home on a separate drive, exactly for the same reasons you wrote about! To be easily able to reinstall my system, whenever I please or have a gut feeling (let's say you try something from Aur, but you get That gut feeling if you know what I mean xD perhaps every Windows user knows that feeling) but keep the most valuable things: your configs/dotfiles which take place after you are done installing the fresh system!

I strongly love the idea of reinstalling and feeling fresh, maybe it's an good practice or maybe it's an basic habbit which I got from using Windows when I was growing up :D I used to pirate a lot, to try everything there is until I grew out of it. Reinstalling Win was an regular practice for me, even if nothing suspicious appeared going on after I used some .exe for a few days.


I've installed base Arch around 200 times~ no joke, when I first got into Arch base that was my main way of "fixing problems" before I actually learned how to fix my problems xD as an result through this repetition I got pretty comfortable! Let's say you download something from Aur and it was Potentially malicious, and you are unsure how to find out - fix it by reinstalling! That's 1000x better than being pwned and not reinstalling :) is that a bad advice for newbies? I don't think so, if you are in doubt then it's doesn't hurt reinstall and having /home on a second partition will save you valuable time.

Personally if I'm not in "exploring mode" in Aur, and I feel nothing malicious could be on my system I still find myself doing a reinstall every 2-4-6 months, it's addictive! And with that comes another practice, changing passwords regularly too which I know a lot of people hate to do :) it's a good security practice for anyone and on any system whether linux or not.


"There have always been ghosts in the machine..." - spooky, I believe that too these days ghosts are even inside our CPUs/who knows what other hardware xD things like these should motivate everyone to stay out of harms way. And I totally get it, after awhile we all get lazy and stop caring but I've noticed something which removes this mundane feeling :P REINSTALL! So you go through the fun and excitement of re-configuring your system again and are motivated to even change your UI or terminal configs or whatever.

Oh well I got bored while preparing my Artix install and just kept rambling, hope any of it makes any kind of sense to anyone xD

Re: Annual clean installs

Reply #7
One thing they had a peculiar insistence on was that /home should never be on the root partition.
I find that sensible not peculiar.
In fact I take it one step further and have a partition for /home and then another partition /home/lee/Files .
In KDE - Desktop, Documents, Downloads etc etc are all set to be under /home/lee/Files . The 'Home' shortcut in Dolphin is set to take me to /home/lee/Files not /home/lee.

This keeps all the user config files separate from the actual data I use.
Though to complicate things further select large, as in file size, directories in ~/.config and ~/.local (lutris, steam and rpcs3 for example) get symlinked into /home/lee/Files/.dotfiles.
Keeping the /home/ partition a reasonable size, and separate from my data, makes it easier for me to do incremental backups of it in case of self induced disaster  :o

Linux - Do it your own way™
Quote
Does anyone else do fresh installs on about a yearly basis?
Not me, but you're right. A separate home partition makes it a simpler task if you wish to.

Re: Annual clean installs

Reply #8
Code: [Select]
paccache -r
It pays to just randomly read these forums... I just did the paccache thingy. Sweet. I bet if I RTFM it'll tell me how to reduce that 3 to a smaller number...

Oh shit! It's the very next line in the wiki entry...
Code: [Select]
You can also define how many recent versions you want to keep. To retain only one past version use:

# paccache -rk1
And it's even coherent, like adults were involved: "-rk1 = remove, keep one."

Mind.
Blown.







I keep my /home on my /

I know this is dumb, but I don't have a good option for putting it elsewhere. I'd love to NFS it to my NAS, but, brain no workie... I still set up my shares with a manually run sshfs script... Sigh... I know... I have big dumb...