Index

July 22, 2014

How to Clean-Up Old Kernel Packages on Ubuntu

Filed under: Administration — Robert Pope @ 12:09 pm

To purge those old unwanted Linux kernel images after running apt-get install on the latest kernel package, first reboot. Next, create a file in your home directory and paste the following code in it: #!/bin/bash for KERNEL in $(dpkg-query -l | awk ‘/linux-image-*/ {print $2}’ | grep -v –regexp=`uname -r`) do apt-get -y remove –purge […]