Again and again, we need to clear our system storage in order to free up space for installing new programs and working with additional files. This is especially important when you have a small storage device or limited memory. Even if you have a large repository, but you, like me, like to clean up the mess from time to time, this article will tell you about several ways to do this. Debian may be a lightweight operating system, but it is not very convenient for storage, especially because it does not remove downloadable packages for installing software.
In this article, you will learn how to clear disk space on a Debian 10 Buster system, mainly through a graphical interface, so that even a novice can master this skill.
Your cart may have a lot of useless data. This takes up equal system space as the most useful data on your system. The easiest and fastest solution is to empty the basket to use this space for more important purposes. Just open the file manager and right-click the trash can icon in the left pane. Select the “Empty Trash” option to permanently delete all files from the trash.
Delete temporary files with BleachBit
Some files on your system, such as browser histories, caches, and temporary files from various programs, may take up more space than you might imagine. BleachBit, available through the Debian Software Center, is an automatic cleaning program that saves your system from all unwanted temporary files. First, download the BleachBit software, and then run it as an administrator using the following command, since in this way you can remove unwanted apt packages and some other system data along with regular temporary files.
$ sudo apt-get install bleachbit
$ sudo bleachbit
When you start BleachBit for the first time, you will be able to configure some settings to clear the data.
Make your selection, and then click Close. After that, you can select the categories of files you want to clear and click the “Clear” button.
Click the Delete button to permanently get rid of temporary files. The following figure shows how disk space was recovered from my system after cleaning. This can be a lot for you, depending on the type of data that you have on your system.
Analyze your disk usage with DISK Usage Analyzer
There may be a large number of junk files in our system, and we will not recognize or remember them. The Disk Usage Analyzer tool scans your file system and presents a graphical representation of directories that take up a huge amount of space on your system. You can access these directories, find and get rid of files that make your storage heavy. You can access this free tool through a search in the Application Launcher as follows:
By clicking on the red zones of your chart, you can go exactly where the heavy file is.
You can then use this information when deciding what needs to be removed to optimize space usage.
Find heavy apps with Synaptic Package Manager
Synaptic Manager can help you get rid of packages that you might have previously used to install certain programs on your system. These packages are only required if you need to uninstall and then reinstall the software. Keeping these packages in your storage is not a smart choice, since a fast Internet connection these days can help you download them very quickly again if necessary.
You can download this package manager from Debian Software Manager if it is not installed by default on your Linux system.
Since the Debian 10 Buster launches Wayland for graphical display, and Synaptic does not run on Wayland, you must run the following commands to start the Synaptic Package Manager.
In the Synaptic Package Manager, click the Status button in the left pane, and then click Installed.
This will list all installed packages on your system. The list in the right pane may not display the default column size. To view this very important column, click the Settings menu and then Settings. Here, make sure the Size column is enabled. Please move this option up so that it starts appearing in your package list. Now that you are browsing the list, you can easily point out packages that take up a lot of space on your system, please do not remove a heavy but important package, such as a kernel package. You can select an item from this list, right-click on that item, and then select Mark for complete removal to remove the unwanted package from your system. Finally, click Apply to commit the changes.
Remove old kernels with Synaptic Package Manager
Whenever you install a new kernel for Debian, it keeps the old kernel saved, and you can even download the old one. Debian does this so that you can access the system even if the new kernel does not work. If you are sure that you can download the latest version and want to uninstall previous versions, you can do this using the Synaptic Package Manager. Just search for the linux- keyword 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 forever by clicking the Apply button.
Using the five methods described in this article, you can free up space on your computer or enjoy a messy environment even if you are new to Debian.
5 Ways to Free Up Disk Space in Debian 10