Ubuntu: Cleanup Old linux-headers And linux-image Packages

The command

# dpkg --get-selections| grep -E "linux-(header|image).*3." | grep -iw install | sort

lists the current installed linux-(image|headers) packages:

linux-headers-3.2.0-30-generic install
linux-headers-3.2.0-30 install
linux-headers-3.2.0-31-generic install
linux-headers-3.2.0-31 install
linux-headers-3.2.0-32-generic install
linux-headers-3.2.0-32 install
linux-image-3.2.0-30-generic install
linux-image-3.2.0-31-generic install
linux-image-3.2.0-32-generic install

On my system I will just keep the current and the one before that:

# apt-get remove --purge 3.2.0-30

It will remove the packages

  • linux-headers-3.2.0-30*
  • linux-headers-3.2.0-30-generic*
  • linux-image-3.2.0-30-generic*

BTW. Found this info in another blog, but cannot remember where nor when, sorry …

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s