Sebastian Mogilowskis Blog

Just another blog about administration, linux and other stuff

packages

Remove old kernel packages from Ubuntu

I blog this because the original blog doesn’t exists any longer. I want to remove all old kernel packages from my system ( Ubuntu Linux ). I found this command: dpkg -l ‘linux-*’ | sed ‘/^ii/!d;/'”$(uname -r | sed “s/\(.*\)-\([^0-9]\+\)/\1/”)”‘/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d’ | xargs sudo apt-get -y purge But you shouldn’t use […]

,