Setting up install pipelinel; metapackage examples

This commit is contained in:
2020-05-02 05:05:48 -05:00
parent 9ea97f0210
commit c6c42779a4
15 changed files with 331 additions and 45 deletions

View File

@@ -5,20 +5,16 @@ rm /var/lib/dbus/machine-id
# Before exiting the chroot, remove the diversion:
# Earlier this guide asked you to make a backup copy of /sbin/initctl.
# If the following command does not restore this file, then restore from the backup copy you made.
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl
# Remove old kernels
ls /boot/vmlinuz-5.4.**-**-generic > list.txt
sum=$(cat list.txt | grep '[^ ]' | wc -l)
if [ $sum -gt 1 ]; then
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
fi
rm list.txt
apt-get update && apt-get upgrade
apt-get autoremove --purge -y
apt-get autoclean -y
apt-get clean
rm -rf /tmp/*
rm /etc/resolv.conf
# Remove old kernels
dpkg -l 'linux-*' | sed '/^ii/!d;/hwe/d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt -y purge; update-grub
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl