Why Linux cleanup utilities are dangerous

Updated: May 28, 2011

In Windows, users periodically power up one of the system tweaking and maintenance programs like CCleaner and alike and rinse-wash their hard drive of crud, including orphaned registry keys, invalid shortcuts, temporary files, cookies, and more. With this or that degree of safety and reliability, Windows users practice a habit of system cleanup every few days. Placebo effect or not, it's a given.

So what happens when you migrate to Linux? You expect the same or very similar results from your new operating system. Hence, you start hunting for cleanup utilities that promise to purge your machine of ill spirits and bad files. And this is where the problem starts. Today, I will explain why using Linux cleanup utilities is a very dangerous and ineffective practice.

Please note this article is mostly intended for INEXPERIENCED Linux users. All of the tools and methods mentioned below can be effective in the hands of power users, but just like security, they cannot be copy & pasted from one world into another. Now, let's rock.


Available software

Unfortunately, quite a few popular Linux distributions, in an attempt to make their product even friendlier and more accessible to Windows converts, package system cleanup utilities in their default collection. This might be considered a linear translation of user needs, but it is in fact a complex issue. First, there's the assumption that users can just plug-n-play into the new environment. Second, it creates an illusion of a need, one that does not exist. End result, inefficient and even detrimental methods are perpetuated, on the expense of real learning and understanding the usage model.


Here's an example. It ships with Ubuntu. Smartly, in Linux Mint, they decided to remove this program from their list. Bottom line, this program is a sort of a system cleanup utility that will remove unneeded packages from your system. Not a good thing, especially if you don't know what you're doing. I've already written about Janitor in my Karmic review. Here's the original statement:

Mimicking Windows, Ubuntu comes with a utility called Janitor, which sort of lets you keep your machine clean of crud. Although you can accomplish the same using the command-line apt-get clean, autoclean and autoremove, which are simple and safe, Janitor makes some additional, very bad judgments for you.

For example, it offered to remove my Adobe flash plugin, marking it as unused, even though I've clearly enjoyed it watching my own Youtube movie.

Flash suggestion


Another example, this one from PCLinuxOS 2010.12. The program will search for packages with multiple versions installed on your system. This sounds good, except what if you need all those versions for some reason? What if you need multiple versions of gcc and kernel headers for compilation? What if you want to use different versions of a browser for compatibility testing?


GConf Cleaner

Another example from PCLinuxOS. For those of you unaware of what GConf is, it is a utility for configuring Gnome desktop environment settings. It has command-line syntax and a frontend called GConf Editor. Some may call it a Linux-like registry, although it is nowhere near as convoluted or complicated. But it does offer control of desktop settings.

Over time, you may accrue lots of unneeded keys in the gconf database, so a cleanup might help. Or so you would think. In fact, it's such a tiny database that removing a handful of keys will earn you a few microseconds, at most. What you could inadvertently achieve is remove important settings, turning your desktop into a mess, with broken configurations and missing keys.


Here's the analysis of the results, just so you can see how unimportant and trivial this usage is. First, I ran the tool on a freshly installed system, hence all errors are a part of the original default configuration. There's a total of 2,200 keys. Scanning even a flat file with 2,200 entries takes less than one second. There's some 40 cleanable keys, which constitute about 2% of the total. Let's be generous, you may save 20 milliseconds.

However, what you may lose - about 40 bad configurations and broken settings. Are you really sure you know what blueman is and what it does? Do you want to mess up with audio plugins for this utility? What does ftp_allow_write mean?

gconf-cleaner results


Yet another example from PCLinuxOS. The program lets you clean lots of things in your system, including the package manager leftovers, the shell history, backup and temporary files, browser caches, and more. Rather dangerous if you don't know what you're doing. Would you delete backup files? Perhaps they are needed? Perhaps you're testing a new version of some package and those .rpmsaved files are actually useful and important? What about .DS_Store files? Do you have any idea what they are?



In openSUSE 11.4 KDE, you will find this program. It does what the rest do. Clean all kinds of things, like recently cached thumbnails, cookies, temporary cache, history of commands, and so forth. Not as bad as the rest of them, but still could cause grief if misused.


Other examples

If you go through my Linux reviews, I'm sure you'll stumble across several more examples of all kinds of cleanup programs, which offer to make your machine lean and efficient, which can't be any farther from the truth. UberStudent offers BleachBit:

BleachBit in UberStudent

mFatOS, the predecessor of AriOS, shipped with Ailurus, a Gnome-desktop pimping utility, which also has an extensive cleanup section. This one lets you sort of reclaim memory, a thing that has no benefit whatsoever, clean recent documents, as well as autoclean old and used packages. Moderately safe, but misguided in purpose.

Cleanup in Ailurus

So what should you do?

Nothing. That's it. As a new Linux user, as a fresh convert, you should do nothing. You should let your system work and refrain from introducing noise that could mask real problems or create new ones that might impede with your experience. In other words, misuse of system tools could lead you to an erroneous conclusion that Linux is something it might not be, good or bad, in relation to Windows and without it.

Again, I want to emphasize that all of the tools listed below CAN be useful. But you need proper understanding of system internals to run them. Much like Windows cleaning utilities. However, debunking the Windows cleanup is near impossible. With Linux, there's still hope. Furthermore, Linux works differently from its proprietary counterpart, hence the need and effectiveness of system cleanup methods are on another scale and of different magnitude.

Wait, learn, explore, one step at a time

I don't want to sound like an all-wise git, but if you really wish to master full control of your Linux box, then you should assume a more passive stance and progress slowly.

First, let the system run in its pristine, unchanged state. See if it works for you. Then, try to observe differences between Linux and Windows, see how the two align and where they veer apart. Third, learn more about the internals. Once you're confident with your understanding of mechanisms at hand, you can slowly, gradually start introducing changes, including cleanup, one fix at a time. And most importantly, BACKUP your system and data. There's data backup and there's system image backup. Do yourself a favor and practice both. And that's all.


Making your system run at peak ability is not a simple thing. Then again, you are quite lucky, because Linux is designed to be rather time-tolerant of your mistakes. With age, you won't notice a deterioration in performance. This translates into a reduced need for spring cleaning activities. That said, you may be tempted to try unto Linux what you know unto Windows.

Linux system cleaning utilities can be effective, however, they must be run with care. Do not let zeal and OCD get the best of you. Make you sure you understand what you're trying to do before you click the button. Inexperienced users should best leave the system cleaning activities for after they have mastered the basic concepts.

I wish there were less exposure to such programs in default application collections packaged with distributions. There's just too much temptation for newbies and fresh converts. However, after reading this article, you may be just a whisk smarter and more prudent. Let your Linux be. The calm and patience will repay in the end.

P.S. The Railroad car cleaning image is in public domain.


You may also like: