<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Remove Old Kernels in Ubuntu</title>
	<atom:link href="http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/</link>
	<description>Linux Tweaks, HowTo&#039;s and Reviews</description>
	<lastBuildDate>Fri, 03 Feb 2012 23:30:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: d4</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-6692</link>
		<dc:creator>d4</dc:creator>
		<pubDate>Wed, 21 Sep 2011 11:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-6692</guid>
		<description>And here is on small script to only keep the currently running kernel and the two most recent ones:

dpkg -l &#124; grep ^ii  &#124; grep &quot;linux-image-[0-9]&quot; &#124; awk -F&#039; &#039; &#039;{ print $2 }&#039; &#124; grep -v `uname -r` &#124; sed &#039;$d&#039; &#124; sed &#039;$d&#039; &#124; sed &#039;s/linux-image//&#039; &#124; xargs -i echo &quot;linux-image{} linux-headers{}&quot; &#124; xargs sudo aptitude purge</description>
		<content:encoded><![CDATA[<p>And here is on small script to only keep the currently running kernel and the two most recent ones:</p>
<p>dpkg -l | grep ^ii  | grep "linux-image-[0-9]" | awk -F' ' '{ print $2 }' | grep -v `uname -r` | sed '$d' | sed '$d' | sed 's/linux-image//' | xargs -i echo "linux-image{} linux-headers{}" | xargs sudo aptitude purge</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to: Removing old kernels in Ubuntu &#171; Azare&#039;s Blog</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-5786</link>
		<dc:creator>How to: Removing old kernels in Ubuntu &#171; Azare&#039;s Blog</dc:creator>
		<pubDate>Thu, 02 Jun 2011 15:54:09 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-5786</guid>
		<description>[...] i want to remove the oldest. For the past few rounds of cleanups, I have used the method found in Tux Tweaks . Just need to copy and paste the commands from that [...]</description>
		<content:encoded><![CDATA[<p>[...] i want to remove the oldest. For the past few rounds of cleanups, I have used the method found in Tux Tweaks . Just need to copy and paste the commands from that [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: techjacker</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-5052</link>
		<dc:creator>techjacker</dc:creator>
		<pubDate>Fri, 04 Mar 2011 15:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-5052</guid>
		<description>brilliant guide thanks very much!


if anyone gets an error about grub when they remove an image eg:
           The link /vmlinuz.old is a damaged link
           Removing symbolic link vmlinuz.old 
            you may need to re-run your boot loader[grub]

then make sure you run this command before you restart!
          sudo update-grub</description>
		<content:encoded><![CDATA[<p>brilliant guide thanks very much!</p>
<p>if anyone gets an error about grub when they remove an image eg:<br />
           The link /vmlinuz.old is a damaged link<br />
           Removing symbolic link vmlinuz.old<br />
            you may need to re-run your boot loader[grub]</p>
<p>then make sure you run this command before you restart!<br />
          sudo update-grub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Lambermont</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-4377</link>
		<dc:creator>Hans Lambermont</dc:creator>
		<pubDate>Sun, 24 Oct 2010 10:37:35 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-4377</guid>
		<description>This one-liner also removes the headers of the current running kernel:
linux-headers-2.6.32-24 for uname -r = 2.6.32-24-generic-pae

Adding &#039;s/-[^0-9].*//&#039; to the line fixes this :

dpkg -l &#039;linux-*&#039; &#124; sed &#039;/^ii/!d;/&#039;&quot;$(uname -r &#124; sed &#039;s/-[^0-9].*//&#039;;&quot;s/\(.*\)-\([^0-9]\+\)/\1/&quot;)&quot;&#039;/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d&#039; &#124; xargs sudo apt-get -y purge</description>
		<content:encoded><![CDATA[<p>This one-liner also removes the headers of the current running kernel:<br />
linux-headers-2.6.32-24 for uname -r = 2.6.32-24-generic-pae</p>
<p>Adding 's/-[^0-9].*//' to the line fixes this :</p>
<p>dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed 's/-[^0-9].*//';"s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Linerd</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-3701</link>
		<dc:creator>Linerd</dc:creator>
		<pubDate>Tue, 27 Jul 2010 14:25:05 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-3701</guid>
		<description>Yep, that&#039;s the same one that Zach posted above. It removes all but the most recent kernel (I think. I&#039;m not sure if avoids removing the currently running kernel, or if it avoids removing the latest).</description>
		<content:encoded><![CDATA[<p>Yep, that's the same one that Zach posted above. It removes all but the most recent kernel (I think. I'm not sure if avoids removing the currently running kernel, or if it avoids removing the latest).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dawie Joubert</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-3696</link>
		<dc:creator>Dawie Joubert</dc:creator>
		<pubDate>Tue, 27 Jul 2010 10:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-3696</guid>
		<description>I found this script on the net some time ago, works wonders:

[term]dpkg -l &#039;linux-*&#039; &#124; sed &#039;/^ii/!d;/&#039;&quot;$(uname -r &#124; sed &quot;s/\(.*\)-\([^0-9]\+\)/\1/&quot;)&quot;&#039;/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d&#039; &#124; xargs sudo apt-get -y purge[/term]</description>
		<content:encoded><![CDATA[<p>I found this script on the net some time ago, works wonders:</p>
<div class="term">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</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thahir</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-3684</link>
		<dc:creator>Thahir</dc:creator>
		<pubDate>Mon, 26 Jul 2010 14:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-3684</guid>
		<description>great....</description>
		<content:encoded><![CDATA[<p>great....</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-2873</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Wed, 21 Apr 2010 19:30:36 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-2873</guid>
		<description>Awesome, Zach! Thanks! Keep showin&#039; us how it&#039;s done! :D</description>
		<content:encoded><![CDATA[<p>Awesome, Zach! Thanks! Keep showin' us how it's done! <img src='http://tuxtweaks.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohit</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-2645</link>
		<dc:creator>Rohit</dc:creator>
		<pubDate>Wed, 17 Mar 2010 14:36:45 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-2645</guid>
		<description>wowwww.its really awesome and seems like magic....!

Thanks for sharing Dude

Thanks for great post, keep it up</description>
		<content:encoded><![CDATA[<p>wowwww.its really awesome and seems like magic....!</p>
<p>Thanks for sharing Dude</p>
<p>Thanks for great post, keep it up</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barb</title>
		<link>http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-1662</link>
		<dc:creator>Barb</dc:creator>
		<pubDate>Thu, 17 Dec 2009 18:40:52 +0000</pubDate>
		<guid isPermaLink="false">http://tuxtweaks.com/?p=1087#comment-1662</guid>
		<description>Thanks Zach! Worked like magic and no pain and suffering on the user end! 

Cheers,
Barb</description>
		<content:encoded><![CDATA[<p>Thanks Zach! Worked like magic and no pain and suffering on the user end! </p>
<p>Cheers,<br />
Barb</p>
]]></content:encoded>
	</item>
</channel>
</rss>

