Skip to content

Commit b40150c

Browse files
committed
temporarily retain old kernels
1 parent e40b603 commit b40150c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

scripts/90-cleanup-qemu.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ elif [ -n "$(command -v apt-get)" ]; then
4949
apt remove -y --purge libc6-dev linux-libc-dev libevent-dev libpcre3-dev libsystemd-dev packagekit multipath-tools unattended-upgrades plymouth gnupg open-vm-tools xauth lxd-installer publicsuffix libclang-cpp18 python3-twisted python-babel-localedata libicu74 python3-pygments fonts-dejavu* python3-botocore
5050

5151
# remove old kernels
52-
CURRENT_KERNEL="$(uname -r | sed 's/-generic//')"
53-
INSTALLED_KERNELS=$(dpkg -l | awk '{print $2}' | grep -Eo 'linux-(image|headers|modules|tools)-[0-9]+' | sed -E 's/linux-(image|headers|modules|tools)-//' | sort -Vu)
54-
REMOVE_KERNELS=$(echo "$INSTALLED_KERNELS" | grep -v -e "$CURRENT_KERNEL")
55-
for VER in $REMOVE_KERNELS; do
56-
for PREFIX in linux-headers linux-image linux-modules linux-tools; do
57-
for PKG in $(dpkg -l | awk '{print $2}' | grep "^$PREFIX-$VER"); do
58-
apt-get purge -y "$PKG"
59-
done
60-
done
61-
done
52+
# CURRENT_KERNEL="$(uname -r | sed 's/-generic//')"
53+
# INSTALLED_KERNELS=$(dpkg -l | awk '{print $2}' | grep -Eo 'linux-(image|headers|modules|tools)-[0-9]+' | sed -E 's/linux-(image|headers|modules|tools)-//' | sort -Vu)
54+
# REMOVE_KERNELS=$(echo "$INSTALLED_KERNELS" | grep -v -e "$CURRENT_KERNEL")
55+
# for VER in $REMOVE_KERNELS; do
56+
# for PREFIX in linux-headers linux-image linux-modules linux-tools; do
57+
# for PKG in $(dpkg -l | awk '{print $2}' | grep "^$PREFIX-$VER"); do
58+
# apt-get purge -y "$PKG"
59+
# done
60+
# done
61+
# done
6262

6363
apt-get -y autoremove
6464
apt-get -y autoclean

0 commit comments

Comments
 (0)