How to Free Up Space on Ubuntu Linux

Ubuntu cleanup

From time to time, we need to clear up our system storage to make space for installing new programs and dealing with additional files. This is especially important when you have a low storage device or a limited storage capacity. Even if you have a large storage available but you are a person like me who likes to clear up clutter from time to time, this article will brief you about multiple ways to do so. Ubuntu might be a light operating system but it is not too friendly on the storage, especially because it does not delete the packages it downloads for installing software.

This article provides you with ways to clear up disk space on an Ubuntu 18.04 system, mostly through the graphical interface so that even a beginner can master this skill.

Empty The Trash

You might have a large amount of useless data residing in your trash can. This takes up equal system space as the most useful data on your system. It is the easiest and quickest solution to empty the trash in order to use that space for more important purposes. Simply open the File Manager and right-click the Trash icon from the left panel. Select the Empty Trash option to permanently delete all the files from the trash can.

Empty trash

Delete Temporary Files Using BleachBit

Certain files on your system like browser histories, caches and temporary files from various programs might be taking more space than you can imagine. BleachBit, available through the Software Centre, is an automatic clean up program that rids your system from all the unwanted temporary files. First, download the BleachBit software and then run it as an administrator through the following command, because this way you will be able to remove the unwanted apt packages and some more system data along with the usual temporary files.

$ sudo bleachbit

The first time you open BleachBit, you will be able to set up some preferences for data cleaning.

Remove Files with NleachBit

Make your choices and then click the Close button. After that, you can select the file categories you want to clean and click the Clean button.

Delete confirm

Click the Delete button to permanently get rid of the temporary files. The following image shows how some disk space was recovered from my system after cleaning it. For you, it might be a lot, depending on the kind of data you have in your system.

BleachBit removed temporary files

Analyze Your Disk Usage Using Disk Usage Analyzer

Our system may have large unwanted files without us knowing or remembering them. The Disk Usage Analyzer tool scans your file system and presents a graphical view of the directories taking a huge chunk of space on your system. You can reach those directories and locate and get rid of the files that are making your storage heavy. You can access this free tool through the Ubuntu Dash as follows:

Disk Usage Analyzer

By clicking the red zones of your graph, you can navigate exactly to where a heavy file resides.

Disk usage analyzed

Find Heavy Applications Using Synaptic Package Manager

Ubuntu 18 comes with a default application called the Synaptic Package Manager. This application can help you get rid of the packages that you might have used to install some programs on your system. These packages are only required if you need to uninstall and then re-install a software. Keeping these packages in your storage is not a very smart choice as fast internet connections these days can help you download them very quickly again when needed.

You can even download this package manager from Ubuntu Software if it does not come by default on your Linux system.

Open the Synaptic Package Manager, click the Status button from the left panel and then click Installed.

Synaptic Package Manager

This will list all the installed packages on your system. The list in the right-panel might not show you the size column by default. In order to view this very important column, click the Settings menu and then the Preferences option. Here, make sure that the Size column is enabled. Please move this option up to the top so that it starts to appear in your list of packages. Now when you view the list, you can easily point out the packages taking a lot of space on your system, please make sure not to delete a heavy but important package, for example, the kernel package. You can select an item from this list and right-click and then select Mark for Complete Removal in order to delete the unwanted package from your system.

Remove Old Kernels Using Synaptic Package Manager

Whenever you install a new Kernel for Ubuntu, it keeps the old Kernel saved and you can even boot to an old one. Ubuntu does this so that you can access the system even if the new kernel is not working. When you are sure you can boot through the latest install and want to delete the previous versions, you can do so through the Synaptic Package Manager. Simply search for the keyword “linux-” and then select the packages you want to remove from the list. Mark them for removal from the right-menu and get rid of them for good.

Remove old Linux kernel versions

Through the five ways described in this article, you can free up space on your computer or enjoy a de-cluttered environment even as an Ubuntu beginner.