11 lines
493 B
Bash
Executable File
11 lines
493 B
Bash
Executable File
#!/bin/bash
|
|
apt-get update
|
|
listUpgrades=`apt list --upgradable |grep upgradable |cut -d/ -f1`
|
|
execUpgrades="DEBIAN_FRONTEND=noninteractive apt-get --yes --assume-yes -o DPkg::options::=\"--force-confdef\" -o DPkg::options::=\"--force-confold\" --only-upgrade install "$listUpgrades
|
|
eval $execUpgrades
|
|
|
|
# https://www.bggofurther.com/2018/07/automate-apt-update-and-keep-current-config-files/
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get --yes autoremove
|
|
DEBIAN_FRONTEND=noninteractive apt-get clean
|