Skip to content

Commit 5b12046

Browse files
committed
chore: remove unused packages from qemu build
1 parent de14ba7 commit 5b12046

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.github/workflows/qemu-image-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- develop
77
- release/*
8+
- da/u24-cleanup
89
paths:
910
- '.github/workflows/qemu-image-build.yml'
1011
- 'qemu-arm64-nix.pkr.hcl'

ansible/vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ postgres_major:
1010
# Full version strings for each major version
1111
postgres_release:
1212
postgresorioledb-17: "17.5.1.009-orioledb"
13-
postgres17: "17.4.1.066"
13+
postgres17: "17.4.1.067-rc.0"
1414
postgres15: "15.8.1.123"
1515

1616
# Non Postgres Extensions

scripts/90-cleanup-qemu.sh

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,32 @@ elif [ -n "$(command -v apt-get)" ]; then
4242

4343
source /etc/os-release
4444

45-
apt-get -y update
46-
apt-get -y upgrade
45+
apt-mark manual libevent-2.1-7t64
46+
47+
apt-get remove -y --purge ansible-core apport appstream bash-completion bcache-tools bind9-dnsutils bind9-host bind9-libs bolt btrfs-progs byobu command-not-found console-setup distro-info eject fonts-ubuntu-console friendly-recovery ftp fwupd gawk gdisk keyboard-configuration libvolume-key1 libssl-dev lvm2 lxd-agent-loader man-db mdadm modemmanager mtd-utils nano netcat-openbsd nfs-common ntfs-3g parted pastebinit screen strace thin-provisioning-tools tmux usb-modeswitch vim vim-runtime wget whiptail xfsprogs
48+
49+
apt remove --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
50+
51+
52+
# remove old kernels
53+
CURRENT_KERNEL="$(uname -r | sed 's/-generic//')"
54+
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)
55+
REMOVE_KERNELS=$(echo "$INSTALLED_KERNELS" | grep -v -e "$CURRENT_KERNEL")
56+
for VER in $REMOVE_KERNELS; do
57+
for PREFIX in linux-headers linux-image linux-modules linux-tools; do
58+
for PKG in $(dpkg -l | awk '{print $2}' | grep "^$PREFIX-$VER"); do
59+
apt-get purge -y "$PKG"
60+
done
61+
done
62+
done
63+
4764
apt-get -y autoremove
4865
apt-get -y autoclean
66+
update-grub
67+
68+
apt-get -y update
69+
apt-get -y upgrade
70+
4971
fi
5072
rm -rf /tmp/* /var/tmp/*
5173
history -c

0 commit comments

Comments
 (0)