quantum-mobile
quantum-mobile copied to clipboard
Run `apt upgrade` and `apt autoremove`?
This would:
- keep all packages up to date (upgrade)
- save disk space (autoremove)
Questions:
- any disadvantages?
- do we already do it anywhere?
This is also for the Cloud edition.
Both of these commands are already run as part of the simulationbase role.
-
apt upgrade
is already run here https://github.com/marvel-nccr/ansible-role-simulationbase/blob/68b025c9bfcfe50b046aca06f50796cc212960e1/tasks/package_managers.yml#L5 -
apt autoremove
(as well as other "cleaning" commands) are run when https://github.com/marvel-nccr/ansible-role-simulationbase/blob/master/handlers/main.yml
Note that both require guards since they aren't idempotent (guard for apt upgrade: 1 day cache; guard for autoremove: only run on demand)
Ok, thanks a lot. I'll look into these.
EDIT: I'm not closing the issue because several packages are out of date even immediately after deployment. In fact, I suspect the correct form of the first task you linked would be:
apt:
name: "*"
state: latest
cache_valid_time: 86400 # One day
MEMO: upgrading the kernel breaks the VirtualBox guest additions, unless kernel headers are also installed.
To install kernel headers, install package linux-headers-generic
: the latest version will be installed.