aboutsummaryrefslogtreecommitdiff
path: root/build-arch-gce
diff options
context:
space:
mode:
authorshulhan <ms@kilabit.info>2021-01-14 20:47:15 +0700
committershulhan <ms@kilabit.info>2021-01-14 21:13:34 +0700
commit94fc0220d45454b8f4f6530fbe1df4ff15c36c24 (patch)
tree10f080477c451043d1f37a3016ebb9d3f055d6e3 /build-arch-gce
parent54bb157ddef05dc1b19b558a9c484e5d2084767a (diff)
downloadcompute-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-xbuild-arch-gce1
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