How to Quickly Clear Your System Cache in Ubuntu
You probably know that your Web browser keeps some cache of sites you’ve visited, so subsequent visits to those sites will load very quickly. Linux, like your browser, has system caches: application caches, APT caches, etc., so subsequent loading of applications will be very fast.
While the concept of caching is certainly a good one from a user experience perspective, it still eats into system memory. At some point, you need to make sure you remove all unnecessary junk files (usually in the form of caching) to keep your system clean and reduce load.
If you’re using Ubuntu 14.04 or 16.04 and looking for an easy way to clear caches from your Ubuntu system, you don’t need to look anywhere else. In this article I’ll discuss how to clear caches.
How to clear the cache
To do this, you need to download and install a tool called Ubuntu Cleaner. Enter the following command on the CLI:
sudo add-apt-repository ppa:gerardpuig/ppa
sudo apt update
sudo apt install ubuntu-cleaner
Copy the code
Once all of the above commands are successful, Ubuntu Cleaner will be installed on your system. To launch it, point to Unity Dash, enter the name of the tool, and click its icon.
This is the interface of the tool.
As you can clearly see from the screenshot above, Ubuntu Cleaner can remove application (browser and software center) caches, thumbnail caches created by the system for quick directory loading, and APT caches (usually for downloaded packages). In addition, utilities can be used to remove old kernels, package configurations, and unwanted packages.
To see how much space a cache takes up in the system, simply click on the corresponding entry. Chrome, for example, uses more than 500 megabytes of cache.
To remove the cache, select the entry and click the Clear button in the lower right corner of the tool.
Before you start using Ubuntu Cleaner to clean everything, remember that caching has a purpose (as explained at the beginning of this tutorial). You have to weigh your options before removing anything — for example, for an application you no longer use, it makes sense to remove its cache, but for an application you use a lot, removing its cache will directly affect its responsiveness.