Delete uninstalled installation packages
The .deb installation file of the deleted software package is deleted from the hard disk.
sudo apt-get autoclean
Delete the installation package of the uninstalled software (delete all packages in the package cache)
By default, Ubuntu keeps all updates it downloads and installs in a cache on disk, just in case you need it again. Of course, the APT cache allows us to install some software packages without downloading a very smooth installation, but the apt package cache can quickly expand to hundreds of MB, taking up a lot of space.
You can view apt through the following command Cache space occupied:
du -sh /var/cache/apt/archives
Clear apt cache by following command
sudo apt-get clean
Note:The apt clean command will delete all packages remaining in the apt cache. Of course, if your local network is not fast, you don’t need to clean it up to avoid the time-consuming downloading of a large number of software packages when installing software. The apt clean command will delete all packages remaining in the apt cache. Of course, if your local network is not fast, you don’t need to clean it up to avoid the time-consuming downloading of a large number of software packages when installing software.
Uninstall all automatically installed packages that are no longer used
Remove packages that were installed to satisfy dependencies on other packages but are no longer needed.
sudo apt-get autoremove
Note:When installing c, c depends on b, and b depends on a. At this time, a and b will be installed automatically. However, If c takes advantage of the condition that b implicitly implies package a by default and directly calls the api in a, the next time package b is updated&