Trace:
wiki:student:how_to_clear_a_full_boot_partition
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
wiki:student:how_to_clear_a_full_boot_partition [2019/03/19 16:07] cwday |
wiki:student:how_to_clear_a_full_boot_partition [2019/03/21 14:56] (current) mchamber |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======How to Clear a Full Boot Partition====== | + | <title>How to Clear a Full Boot Partition</title> |
| Ubuntu usually creates a separate /boot partition for storing Linux kernels. This isolates the kernels from the rest of the operating system, which helps make the system more stable. However, as it is usually a small partition (> 200 MB), it can fill up with old kernels. While keeping a couple old kernels around can be advisable, so as to be able to roll back to old kernels if a new one proves unstable (an unusual occurrence), it is not necessary to keep more than one or two. | Ubuntu usually creates a separate /boot partition for storing Linux kernels. This isolates the kernels from the rest of the operating system, which helps make the system more stable. However, as it is usually a small partition (> 200 MB), it can fill up with old kernels. While keeping a couple old kernels around can be advisable, so as to be able to roll back to old kernels if a new one proves unstable (an unusual occurrence), it is not necessary to keep more than one or two. | ||
| Line 14: | Line 14: | ||
| * You will probably need to use the same command to delete the ''linux-image-extra'' version of the corresponding kernels to fix dependency problems. | * You will probably need to use the same command to delete the ''linux-image-extra'' version of the corresponding kernels to fix dependency problems. | ||
| - Once you are certain you have enough free space fix any existing dependency problems. | - Once you are certain you have enough free space fix any existing dependency problems. | ||
| - | - //Make sure this command does not try to reinstall the kernels you just removed.// If it does, you need to remove the ''linux-image-extra'' packages for those kernels (there may be other such dependencies, check online). | ||
| * <code>sudo apt-get install -f</code> | * <code>sudo apt-get install -f</code> | ||
| + | * //Make sure this command does not try to reinstall the kernels you just removed.// If it does, you need to remove the ''linux-image-extra'' packages for those kernels (there may be other such dependencies, check online). | ||
| - Once you've got any dependency issues resolved, run **''sudo apt-get autoremove''** to remove the other old kernels. | - Once you've got any dependency issues resolved, run **''sudo apt-get autoremove''** to remove the other old kernels. | ||
| * As an alternative to ''autoremove'', you try the following command, though using a low-level utility such as dpkg is not necessarily recommended. It will remove all kernels except the one currently running. | * As an alternative to ''autoremove'', you try the following command, though using a low-level utility such as dpkg is not necessarily recommended. It will remove all kernels except the one currently running. | ||
| * <WRAP prewrap><code>sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//)")</code></WRAP> | * <WRAP prewrap><code>sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//)")</code></WRAP> | ||
| - Odds are, there's a new kernel waiting to be installed. Once you've done all this to clear out your ''/boot'' partition, run **''apt-get update''** and **''apt-get upgrade''** to update your system (including any new kernels). | - Odds are, there's a new kernel waiting to be installed. Once you've done all this to clear out your ''/boot'' partition, run **''apt-get update''** and **''apt-get upgrade''** to update your system (including any new kernels). | ||
wiki/student/how_to_clear_a_full_boot_partition.1553033263.txt.gz · Last modified: 2019/03/19 16:07 by cwday