From 94fc0220d45454b8f4f6530fbe1df4ff15c36c24 Mon Sep 17 00:00:00 2001 From: shulhan Date: Thu, 14 Jan 2021 20:47:15 +0700 Subject: 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. --- build-arch-gce | 1 + 1 file changed, 1 insertion(+) (limited to 'build-arch-gce') 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 -- cgit v1.3