You probably know that your web browser keeps a cache of the websites you visit so subsequent visits will be loaded very quickly. Linux, like your browser, also keeps a system cache – application cache, apt cache, etc. – so subsequent loading of the application will be very fast.
While the concept of a cache is no doubt good from a user experience point of view, it keeps on eating your system’s memory. At some point you need to make sure that you delete all the unnecessary or junk files, usually in the form of the cache, to keep your system fresh and less loaded down.
If you are using Ubuntu 14.04 or 16.04 and are looking for a way to easily clear the system cache from your Ubuntu system, look no further, as in this article we will discuss just that.
How to easily clean your Ubuntu box
To do this you need to download and install a tool called Ubuntu Cleaner. The following commands let you do this:
Once all the above commands are successful, the Ubuntu Cleaner utility will be installed on your system. To launch it, head to the Unity Dash, type the tool’s name, and then click its icon.
Here’s the UI of the tool.
As is clear from the screenshot above, Ubuntu Cleaner lets you delete application (browsers and Software Center) caches, the thumbnail cache that the system creates for the fast loading of directories, and apt cache (usually a cache of downloaded package archives). In addition, you can also use the utility to delete old kernels, package configs, and unneeded packages.
To see how much space a particular cache is occupying on the system, just click the corresponding entry in the tool’s UI. For example, in my case the tool told me that Chrome’s cache is occupying nearly 550MB on my system.
To delete a cache, select the entry and then click the Clean button present at the bottom-right corner of the tool’s UI.
Before you jump in and start cleaning everything using Ubuntu Cleaner, keep in mind that caches are there for a purpose (as was explained in the beginning of the tutorial). You’ll have to weigh your options before deleting anything – for example, for an app you no longer use, it makes sense to delete its cache, but for an application you use very frequently, deleting its cache would directly impact its speed and responsiveness.
Moving on, it’s always good to know a few details about the tool you are using. So here are the details we know about Ubuntu Cleaner: If you’ve been using Ubuntu for many years now, Ubuntu Cleaner should remind you of the now-deprecated Ubuntu Tweak tool. If that’s the case, then you aren’t wrong because Ubuntu Cleaner is a fork of Ubuntu Tweak’s Janitor module. The developer’s aim was to “bring back that useful functionality to the Ubuntu community.”
As computer users, we should learn to maintain a certain balance between things – case in point, cleaning various caches. While you shouldn’t let cache sizes grow indefinitely, deleting each and every cache isn’t a wise decision either. Make a wise use of the tool we’ve discussed, and you’ll get the best of both worlds – speed as well as storage.