User Tools

Site Tools


ubuntu:apt-get:clean_the_system

This is an old revision of the document!


Ubuntu - apt-get - Clean the system

Free up some disk space.


sudo apt-get clean

Only remove packages that have a newer version available

sudo apt-get autoclean

NOTE: autoclean only removes those retrieved package files that have a newer version now, and so will not be used anymore.

  • This command removes .deb files for packages that are no longer installed on your system.
  • Depending on your installation habits, removing these files from /var/cache/apt/archives may regain a significant amount of diskspace.

Removes libraries and packages that were installed automatically to satisfy the dependencies of another installed package

sudo apt-get autoremove

NOTE: autoremove removes libraries and packages that were installed automatically to satisfy the dependencies of another installed package.

  • If that package is removed, these automatically installed packages are useless in the system, and this command removes such packages.
ubuntu/apt-get/clean_the_system.1687107945.txt.gz · Last modified: 2023/06/18 17:05 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki