Skip to content

Commit 3fd475a

Browse files
committed
Actually clean the apt cache
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 <llamasoft@rm-rf.email>
1 parent 3b1d6dc commit 3fd475a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

builder/pwnagotchi.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,14 @@
381381
You learn more about me at https://pwnagotchi.ai/
382382
when: hostname.changed
383383

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

388393
- name: remove dependencies that are no longer required
389394
apt:

0 commit comments

Comments
 (0)