Cleaning Up Linux Headers

  • Post by Mike Dixson
  • Oct 09, 2014
post-thumb

Make sure you’ve rebooted BEFORE running any of these commands so that you are actively using the latest kernel.

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

If you’ve had a previous apt-get install fail due to disk space issues and you’re trying to clean up the linux headers to free disk space run the below command which will force the purge
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y -f purge

LATEST POST
  • Post By Mike Dixson
  • Nov 17, 2020
Using MFA for Sudo Only
  • Post By Mike Dixson
  • Jul 25, 2020
Fixed: Obelisk not working in Ableton Live
  • Post By Mike Dixson
  • Jul 20, 2020
Musical Instrument Frequency Range Chart
TAG