Clear unnecessary usage of Ubuntu disk space
A considerable number of users have started to use Linux to test and work on the server. Once you make up your mind to install Linux, you may find that it is not terrible, in many cases, the usage is much easier and faster than you expected.
I think many of my friends started from Ubuntu, and most new users will try a lot of applications. This causes Ubuntu to consume a lot of disk space overhead, especially after installing and uninstalling a large number of applications. However, it is confusing for new users to release unnecessary Ubuntu disk space.
However, it is confusing for new Ubuntu users that it is not like a Windows disk space cleanup tool with a graphical interface. How can we clean up unnecessary Ubuntu disk space? In fact, we only need to execute two simple commands in the terminal. Here we will explain in detail.
When we install software packages in Ubuntu, sometimes the system automatically installs necessary software packages to solve the dependency problems that are widely known in Linux. However, when you Uninstall a software package, the software package installed due to dependency does not always be deleted, and it will occupy unnecessary disk space when it is left in the system. If such software packages accumulate less, they will occupy a large amount of unnecessary Ubuntu disk space.
Sudo apt-get autoremove
How to clear unnecessary occupied Ubuntu disk space
We can use the preceding commands to automatically clear unnecessary dependent packages and earlier kernel files that are no longer used by Ubuntu.
When we install an application in the Ubuntu Software Center or using apt-get, the DEB installer of the application (similar to the exe or MSI installation package in Windows) will be downloaded to the disk, after the application is installed, these DEB files are stored in the hard disk, which also occupies a large amount of space.
Sudo apt-get clean
How to clear unnecessary occupied Ubuntu disk space
We can use the above command to clear the cached installation package during installation. There is no risk to clear the DEB installation cache file. When you want to reinstall a software, the Package Manager will re-download the installation file.
This article permanently updates the link address: