How I Keep My Operating System Clean
Simple guidelines for maintaining a clean & clutter-free system.
Introduction
From the few years I've spent daily driving Linux, I've developed a set of rules and guidelines that help me keep my system clean.
Aside from clearing caches on a regular schedule (which I think everyone should do), these are the practices I follow, ordered from the simplest to the most advanced, for your reading pleasure.
Don't install at all
Saw this one coming, didn't you? Web apps have become so much better these days that most of the software you want to use already has a web version, just use that.
A browser gives us a pretty good sandbox for our apps, even if something goes wrong, it's just a matter of clearing the site cache. This is not universal, and some apps only provide stripped-down version on the web or none at all.
Free after use
For me, most applications fall into one of two categories: they're either rarely used or meant for one-time use. Rather than keeping them around, they get uninstalled as soon as the job is done.
Take OBS, for example. Every once in a blue moon I need to screen-record something, so I'll install it, record what I need, then remove it. There's no point letting it sit on my system taking up disk space (yes, I know storage is cheap, but you wouldn't be reading this far if you thought that) and consuming network bandwidth every time the system updates.
Of course, this is very specific to my use case; if you're someone who streams or records videos often, it makes sense for you to keep it installed, but look around and find an app or two that you know you won't use anytime soon. Just uninstall it.
The install gate
The previous two rules work pretty much everywhere. This one is mostly for Linux users.
Alright, the web app isn't cutting it, or its non existent. Well before you run sudo <pkg-mgr> install app, try this last one out
If it's a CLI application, see if you can run it in a container. If it's a GUI application, check whether there's a Flatpak or AppImage available. Some applications, like qBittorrent, even provide Docker images with a WebUI, letting you avoid installing them directly on your system altogether.
Only reach for your native package manager if none of those options work.
And when you do install it, see what the package/install script actually does. Does it create users or groups? Does it leave data under /var/lib, /var/cache, /var/log, or /etc? Most package managers remove the package just fine, but they won't always clean up everything the application created. Knowing what changed makes it much easier to get back to a clean system later.
Okay, if you've made it this far, The app is good and the app is here to stay. Go ahead and install it.