autoremove apt packages after upgrades #180

Merged
c6ristian merged 1 commit from apt_autoremove into main 2026-10-31 23:41:54 +01:00
2 changed files with 5 additions and 1 deletions

View file

@ -1,6 +1,6 @@
# Role `apt_update_and_upgrade`
This role does an `apt-get update`, `apt-get dist-upgrade` and a potential reboot (if packages got upgraded) on the specified hosts.
This role does an `apt-get update`, `apt-get dist-upgrade`, `apt-get autoremove` and a potential reboot (if packages got upgraded) on the specified hosts.
## `hosts`

View file

@ -11,3 +11,7 @@
register: apt_update_and_upgrade__upgrade_result
notify:
- reboot the system
- name: Remove dependencies that are no longer required
ansible.builtin.apt:
autoremove: true