diff options
| author | shulhan <ms@kilabit.info> | 2021-01-14 20:47:15 +0700 |
|---|---|---|
| committer | shulhan <ms@kilabit.info> | 2021-01-14 21:13:34 +0700 |
| commit | 94fc0220d45454b8f4f6530fbe1df4ff15c36c24 (patch) | |
| tree | 10f080477c451043d1f37a3016ebb9d3f055d6e3 /build-arch-gce | |
| parent | 54bb157ddef05dc1b19b558a9c484e5d2084767a (diff) | |
| download | compute-archlinux-image-builder-94fc0220d45454b8f4f6530fbe1df4ff15c36c24.tar.xz | |
all: remove downloaded packages before building image
By removing the downloaded packages in the target we can minimize
generated image size from 514MB to around 340MB.
Diffstat (limited to 'build-arch-gce')
| -rwxr-xr-x | build-arch-gce | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/build-arch-gce b/build-arch-gce index 66a8bc7..c9b3b0f 100755 --- a/build-arch-gce +++ b/build-arch-gce @@ -164,6 +164,7 @@ EOS echo '- Cleaning up and finalizing the image.' > "$mount_dir/etc/machine-id" rm -- "$mount_dir/var/log/pacman.log" +rm -f "$mount_dir/var/cache/pacman/pkg/*" umount -- "$mount_dir" unset mount_dir |
