Skip to content

Instantly share code, notes, and snippets.

@wimvds
Created October 27, 2016 11:29
Show Gist options
  • Save wimvds/c65455c0b3d1c3182cdc4acc18446bcb to your computer and use it in GitHub Desktop.
Save wimvds/c65455c0b3d1c3182cdc4acc18446bcb to your computer and use it in GitHub Desktop.
What to do if /boot reaches 100%
List all old kernels that can be removed (Debian) :
dpkg -l linux-{image,headers}-* | awk '/^ii/{print $2}' | egrep '[0-9]+\.[0-9]+\.[0-9]+' | grep -v $(uname -r)
Remove them using dpkg --purge :
ie. dpkg --purge linux-headers-3.13.0-86 linux-headers-3.13.0-86-generic linux-image-3.13.0-86-generic linux-image-extra-3.13.0-86-generic
Afterwards run apt-get autoremove (if needed preceded by apt-get -f install).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment