Clear unnecessary usage of Ubuntu disk space

Source: Internet
Author: User

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:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.