deb-update.bash: run apt-get autoremove also before apt-get upgrade (kernel space issues?)

This commit is contained in:
Aminda Suomalainen 2022-09-07 16:10:44 +03:00
parent acfddc6a62
commit 61e218a15b
Signed by: Mikaela
SSH Key Fingerprint: SHA256:y2OpGEbett3Fqn8XFrP0X4mWfCVKf4rWkxERzqPY81U
1 changed files with 4 additions and 1 deletions

View File

@ -19,10 +19,13 @@ if hash apt-get 2>/dev/null; then
# Checking for updates or new packages.
apt-get -y update
# potentially unsafe first time, so there hopefully is space for new kernels
apt-get "$@" autoremove
# If arguments like -y are passed to the script, they become "$@"
apt-get "$@" upgrade --with-new-pkgs
# potentially unsafe
# potentially unsafe, second time after new kernel is installed
apt-get "$@" autoremove
fi