Debian - Free up some disk space

April 2018

Under Debian (for most Linux distributions) you can free up some disk space, simply by deleting the configuration files resulting unistallation of packages.
The commands to be used are:
  • dpkg --purge $(dpkg --get-selections | grep deinstall$ | cut -f 1)
  • dpkg --purge $(dpkg --get-selections | awk '$2 ~ /de/ { print $1 } ' )

Remove downloaded packages (installation files)

  • aptitude clean

Removing orphan packages

  • dpkg --purge $(deborphan)
Published by deri58. Latest update on July 18, 2011 at 09:47 AM by deri58.
This document, titled "Debian - Free up some disk space," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (
Ubuntu - Keyboard shortcuts to be used in a terminal
Expect: getting out of control interact