Conary:Erase Kernel Troves
From rPath Wiki
(Redirected from Conary:Erase Kernel Troves HOWTO)
After updating a kernel on your Conary-based system and ensuring it is working as needed for the system, you may wish to erase older kernel versions. Include the kernel trove's revision when using conary erase just as when erasing other troves.
Specifying a trove version is typically optional, but it is necessary in instances (such as with kernels) in which you have more than one revision of a trove installed.
| If you do not specify which version of kernel to unpin and erase, Conary will unpin and erase all kernel troves. Use the unpin with caution and only when specifying the kernel version; always think of pinning as the means by which the kernel is protected from arbitrary erase commands. |
Query for the installed kernel versions, and use the version number in the conary unpin and conary erase commands:
# conary q kernel
kernel=2.6.16.24-0.1-1[~!kernel.debug,~!kernel.debugdata,...]
kernel=2.6.16.19-1-0.1[~!kernel.debug,~!kernel.debugdata,...]
kernel=2.6.17.11-1-0.1[~!kernel.debug,~!kernel.debugdata,...]
kernel=2.6.16.26-0.1-1[~!kernel.debug,~!kernel.debugdata,...]
# conary unpin kernel=2.6.16.19-1-0.1
# conary erase kernel=2.6.16.19-1-0.1
Applying update job:
Erase kernel(:build-tree :configs :runtime)=2.6.16.19-1-0.1[~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!kernel.smp is: x86(~!mmx)]
# conary q kernel
kernel=2.6.16.24-0.1-1[~!kernel.debug,~!kernel.debugdata,...]
kernel=2.6.17.11-1-0.1[~!kernel.debug,~!kernel.debugdata,...]
kernel=2.6.16.26-0.1-1[~!kernel.debug,~!kernel.debugdata,...]
(The kernel flavors were truncated in the example output.)
In the example, the oldest kernel in the list was unpinned and erased, and a final query command confirmed which kernels remained installed.
