User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
remove_old_debian_kernels [2017/01/31 15:44] – created ssm2017remove_old_debian_kernels [2022/02/07 13:29] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== remove old debian kernels ======
 source in #proxmox@irc.freenode.net source in #proxmox@irc.freenode.net
  
Line 18: Line 19:
 # remove all kernel headers packages except the currently booted one, and the latest one # remove all kernel headers packages except the currently booted one, and the latest one
 apt-get purge -y $(dpkg -l 'linux-headers*' | grep -E "linux-headers-[0-9\.-]+" | awk '$1 == "ii" {print $2}' | grep -vE "$current|$latest") apt-get purge -y $(dpkg -l 'linux-headers*' | grep -E "linux-headers-[0-9\.-]+" | awk '$1 == "ii" {print $2}' | grep -vE "$current|$latest")
 +</sxh>
 +
 +== alternative ==
 +<sxh bash>
 +apt-get remove $(dpkg -l | egrep  '^ii  (pve-)?kernel-' | awk '{print $2}' | grep -v `uname -r`)
 </sxh> </sxh>
  
 {{tag>debian kernel}} {{tag>debian kernel}}

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information