Skip to content

Commit 58095c8

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 c63cbe0 commit 58095c8

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
@@ -375,9 +375,14 @@
375375
You learn more about me at https://pwnagotchi.ai/
376376
when: hostname.changed
377377

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

382387
- name: remove dependencies that are no longer required
383388
apt:

0 commit comments

Comments
 (0)