diff --git a/packer_templates/scripts/debian/cleanup_debian.sh b/packer_templates/scripts/debian/cleanup_debian.sh index c99bf448a..8a6aa48a5 100644 --- a/packer_templates/scripts/debian/cleanup_debian.sh +++ b/packer_templates/scripts/debian/cleanup_debian.sh @@ -9,7 +9,7 @@ dpkg --list \ echo "remove specific Linux kernels, such as linux-image-4.9.0-13-amd64 but keeps the current kernel and does not touch the virtual packages" dpkg --list \ | awk '{ print $2 }' \ - | grep 'linux-image-[234].*' \ + | grep 'linux-image-[1-9].*' \ | grep -v "$(uname -r)" \ | xargs apt-get -y purge;