Skip to content

Instantly share code, notes, and snippets.

@carlosescri
Last active February 13, 2020 20:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosescri/9109848 to your computer and use it in GitHub Desktop.
Save carlosescri/9109848 to your computer and use it in GitHub Desktop.
Some commands to clean Ubuntu from trash, old kernels...
$ sudo apt-get autoclean
$ sudo apt-get clean
$ sudo apt-get autoremove
# if you installed the debian-goodies package...
$ dpigs -H -n 25
# You can install ncdu to find large files in a graphical interface through terminal
$ ncdu
# If you find huge log files you don't need anymore you can rotate them,
# delete gzipped ones and truncate those that may be being used.
$ sudo truncate --size=0 /var/log/mail.log.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment