Based on my past experience and research on Linux, I have noted down some Todo’s in case your linux system is performing low and you are looking for ways to Clean Linux System. As I mentioned in my previous article How to Speed Up Your Linux System that I will share some more ideas and ways to clean your linux system and eventually to take your linux system performance from low to high as if you have just installed a fresh copy of linux.

Excited to know about these very easy to use and safe methods to Clean Linux System that you can use from time to time in your routine linux usage for that matter it’s for personal use or programming. Keep calm and go through these simple steps to Clean Linux System and live a high performance life when it comes to linux system usage. If you think this article helped to Clean Linux System, then please do give your feedback in comment section below and share it with your colleagues who work on Linus and Want to Clean Linux System.

Clean Linux System: Empty the trash bin

1. Maybe too obvious to mention, but still: don’t forget to empty the trash bin from time to time. Right-click mouse on the Trash folder in your file manager – Empty trash.

Clear the updates cache

2. Launch Synaptic Package Manager.

Panel of Synaptic: Settings -> Preferences -> Files

Put the dot at: Delete downloaded packages after installation

Press the button: Delete cached package files

Clear the thumbnail cache

3. For each shown picture, Mint automatically creates a thumbnail, for viewing in the file manager. It stores those thumbnails in a hidden directory in your user account (names of hidden directories and hidden files start with a dot, like .cache or .bash_history. The dot makes them hidden).

Over time, the number of thumbnails can increase a lot, up to 512 MB. Moreover, the thumbnail cache will eventually contain many superfluous thumbnails of pictures that don’t exist anymore. By default, only thumbnails older than six months will be deleted.

The quickest way to get rid of them is to use the terminal:

Launch a terminal window.

Type (use copy/paste to avoid errors; this is one line):

rm -v -f ~/.cache/thumbnails/*/*.png ~/.thumbnails/*/*.png

Press Enter.

Followed by (this is one line, use copy/paste to avoid typo’s):

rm -v -f ~/.cache/thumbnails/*/*/*.png ~/.thumbnails/*/*/*.png

Press Enter.

Note: this will probably affect the thumbnails on your desktop as well; in that case it should suffice to simply refresh your desktop (or log out and in again), which will create them anew.

Repeat the above in each user account.

Do you wish to change the settings for thumbnails, so that their maximum size and age are reduced? Then proceed like this:

First install dconf-editor. In the terminal:

sudo apt-get install dconf-editor

Press Enter. Your password will remain entirely invisible, not even dots will show when you type it, that’s normal. Press Enter again.

Then in the terminal:


Press Enter.

Expanding the subitems can be done by clicking on the little triangle before an item. Click your way to: org -> gnome -> desktop -> thumbnail-> cache

Click once on maximum-age and set it to 30 (for example, if you want 30 days as maximum age).

Then click once on maximum-size and set it to 50 (for example, if you want 50 MB as maximum size). Repeat this in each user account. That way, you won’t have to pay attention to the disk space of the thumbnails anymore.

The registry

4. There’s no need to clean the registry of Linux, as it can’t get polluted in the first place. For the following reasons:

– Only the operating system itself has a central registry. The configurations of the applications aren’t in there, because they don’t have access to it. So they can’t mess it up. They place their own default settings in their own folders in the system.

– applications place upon installation a hidden settings file in the personal folder of each user. That’s the only settings file that a user has access to. More or less like MS-DOS did, when each application only created its own .ini file with its settings.

– each user has his own hidden copy of the central registry in his personal folder. That copy is the only thing that he can mess up, not the registry of another user account.

Make Firefox cleanse itself automatically upon quitting

5. Improve your privacy: you can configure Firefox to cleanse itself automatically, upon quitting. All cookies and history are being deleted then. Furthermore, you can limit the tracking that some websites do to follow you.

The price you pay is a small decrease in user friendliness, but it’s not much. The privacy gain is huge, and outweighs this price by far.

You can do it like this:

Panel of Firefox -> Edit -> Preferences -> tab Privacy

a. Item Tracking: set it to:
Tell sites that I do not want to be tracked

b. Item History: change the setting to:
Firefox will: Use custom settings for history

c. Item Cookies: change the setting to:
Keep until: I close Firefox

d. Now tick the following setting:
Clear history when Firefox closes

e. Finally, click the button “Settings…” and tick everything, except for Saved Passwords and Site Preferences. Click OK.

Click Close and you’re done.

Tip: sometimes it may come in handy to force a cleansing during your web browsing. Simply close Firefox and launch it anew.

Remove old kernels

6. You may have installed new kernels, even though the Update Manager of Mint doesn’t offer those for all update policies. If so, you may want to clean up a bit, after a while.

After a kernel update, the old kernel still shows in the Grub boot menu, under the header Previous Linux versions. Because you might want to start your machine with the old kernel, if the new kernel doesn’t function well.

So far, so good. But having more than one redundant kernel is superfluous and a waste of disk space, because each kernel uses up more than 200 MB (headers included). Below I describe how you can remove old kernels and thereby clean up the Grub boot loader menu as well.

First this, however: a Linux Mint version should preferably stick to the kernel series it had on release date, because with that it’ll function optimally. Kernel updates should preferably only be minor newer versions within that particular kernel series. With the notable exception of very new hardware, which often needs a newer kernel series in order to work well.
Clean Linux System
For example: Linux Mint 18.1 was first released with kernel 4.4.x. It should preferably remain 4.4, but for the minor version number you might have applied updates.

I repeat, because it’s important:

when you apply kernel updates: stay preferably within the kernel series for which your Linux version has been primarily designed. So in the case of Linux Mint 18.1: select 4.4.x, but preferably not higher numbers (unless you need such a newer kernel for your hardware).

Now let’s get started (based on the example of Linux Mint 18.1):

a. Launch Update Manager. In the toolbar of Update Manager: View – Linux kernels

This may take some time. Then a warning window pops up. Click “Continue” in order to proceed.

b. Click on the kernel that you want to throw away, and then click on the “Remove” button. See the screenshot below (click on it to enlarge it):

Tip: leave the latest redundant old kernel in your system, just to be on the safe side. It never hurts to have a spare kernel that’s known to work well.

c. Now reboot your computer.

Finished! That’s all you ever need to do. Doing more is risky and not advisable.

Note: don’t use cleaning applications like Computer Janitor and Bleachbit for this job! They are dangerous and at best superfluous.

Want to get rid of polluted settings in your web browser?

7. Do you have polluted settings in Firefox, Chrome or Chromium (sometimes caused by rotten, shady or rogue add-ons), and do you wish to start anew with a clean browser? Then proceed like this:

a. First make a backup of your current web browser settings (because you never know why you might need them sometime):

– Launch a terminal window.

– Use copy/paste to transfer the following green command line to the terminal:

For Firefox:
cp -r ~/.mozilla ~/.mozillabkp

Press Enter.

For Chrome:
cp -r ~/.config/google-chrome ~/.config/google-chromebkp

Press Enter.

For Chromium:

cp -r ~/.config/chromium ~/.config/chromiumbkp

Press Enter.

b. Now export your bookmarks to a backup file:

For Firefox:
Click the Bookmarks button (the one on the right of the little star) – Show All Bookmarks

Import and Backup -> Backup

Save the bookmarks-xxx.json file to the location you prefer.

Then, Import bookmarks again in a clean Firefox.

For Chrome / Chromium:

On the upper right in your browser window, click on the three dashes – Bookmarks – Bookmark manager

Click on Organize – Export bookmarks to HTML file…

Then, Import them in your clean Chrome / Chromium.

c. You will also lose all of your stored login passwords for websites! Make sure you know them all.

d. Close the web browser you wish to clean.

e. Launch a terminal window.

f. Copy/paste this green command line into the terminal:

For Firefox:
rm -r -v ~/.mozilla && rm -r -v ~/.cache/mozilla

Press Enter.

For Chrome:
rm -r -v ~/.config/google-chrome && rm -r -v ~/.cache/google-chrome

Press Enter.

For Chromium:

rm -r -v ~/.config/chromium && rm -r -v ~/.cache/chromium

Press Enter.

g. Launch your web browser again. It should be clean.

h. Import your old bookmarks from the backup you’ve created. Importing can be done by means of the same feature as the one you’ve used for exporting.

You’re done! From now on, avoid all shady add-ons and extensions, and install only those that you really need and trust.

Want more tips?

8. Do you want more tips and tweaks for Linux Mint? There’s a lot more of them on this website!

Thank you for reading this article “Clean Linux System”. I hope it will benefit you in your routine work on Linux. Please show your support by leaving a comment below and share it, if you found this article interesting and helpful to Clean Linux System.

Leave a Reply

Your email address will not be published. Required fields are marked *