Skip to content

Commit

Permalink
Actually clean the apt cache
Browse files Browse the repository at this point in the history
As the added comments describe, the options available to us from Ansible's
apt module don't actually clean the apt cache.
Manually running apt-get clean recovers around 400MB of space.

Signed-off-by: llamasoft <[email protected]>
  • Loading branch information
llamasoft committed Oct 3, 2022
1 parent 3b1d6dc commit 3fd475a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions builder/pwnagotchi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,14 @@
You learn more about me at https://pwnagotchi.ai/
when: hostname.changed

# Ansible's apt module has an "autoclean" option but it only removes packages
# that can no longer be downloaded. Ansible v2.13 added the "clean" option
# which actually purges the apt cache, but that's newer than what we can
# install from the RasPiOS repos. Instead, we'll manually clean the cache.
- name: clean apt cache
apt:
autoclean: yes
command: "apt-get clean"
args:
warn: false

- name: remove dependencies that are no longer required
apt:
Expand Down

0 comments on commit 3fd475a

Please sign in to comment.