Complete removal of old Linux images: Difference between revisions

From WickyWiki
mNo edit summary
mNo edit summary
Line 7: Line 7:
= Removing old Kernels =
= Removing old Kernels =


* Install Synaptic package manager:
Install Synaptic package manager:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
Line 13: Line 13:
</syntaxhighlight>
</syntaxhighlight>


* Check the kernel that you use:
Show your current kernel:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
Line 20: Line 20:


<blockquote>
<blockquote>
{| class="wikitable"
<syntaxhighlight lang=terminal>
|-
linux-image-3.13.0-125-generic
| Do '''NOT''' remove the kernel that you use and be advised to keep 1 or 2 older versions
</syntaxhighlight>
|}
</blockquote>
</blockquote>


* Start Synaptic.
Remove older kernels:
 
# Start synaptic.
* Search for 'linux-image', right-click a kernel and choose 'Complete removal' and click the Apply button to delete the kernel.
# Search for 'linux-image'
# Filter for installed packages
# (multi) select the packages with names like 'linux-image-3.13.0-125-generic'. Do  '''NOT''' select your current or newer kernels. You might want to keep one older version as well.
# Right-click a kernel and choose 'Complete removal'. Related packages will be selected automatically.
# click the Apply button, it might take some time to complete


* Repeat this search and removal for 'linux-header'.
Remove corresponding headers:
* Repeat this search and complete removal for 'linux-header' with corresponding names like 'linux-headers-3.13.0-125'. Again, do  '''NOT''' select your current or newer kernels.


= Why =
= Why =

Revision as of 07:39, 11 August 2017


Removing old Kernels

Install Synaptic package manager:

sudo apt-get install synaptic

Show your current kernel:

uname -r
linux-image-3.13.0-125-generic

Remove older kernels:

  1. Start synaptic.
  2. Search for 'linux-image'
  3. Filter for installed packages
  4. (multi) select the packages with names like 'linux-image-3.13.0-125-generic'. Do NOT select your current or newer kernels. You might want to keep one older version as well.
  5. Right-click a kernel and choose 'Complete removal'. Related packages will be selected automatically.
  6. click the Apply button, it might take some time to complete

Remove corresponding headers:

  • Repeat this search and complete removal for 'linux-header' with corresponding names like 'linux-headers-3.13.0-125'. Again, do NOT select your current or newer kernels.

Why

Reasons why you might want to do this:

  • free up some disk space, could be some Gb-s
  • speed-up grub updates