diff --git a/images/macos/provision/configuration/cleanup-brew.sh b/images/macos/provision/configuration/cleanup-brew.sh new file mode 100644 index 00000000..99d596b1 --- /dev/null +++ b/images/macos/provision/configuration/cleanup-brew.sh @@ -0,0 +1,7 @@ +#!/bin/bash -e -o pipefail +########################################################################### +# The script removes local Homebrew cache +# +########################################################################### + +rm -rf "$(brew --cache)" diff --git a/images/macos/templates/macOS-13.anka.pkr.hcl b/images/macos/templates/macOS-13.anka.pkr.hcl index 17ca5fdf..94eee206 100644 --- a/images/macos/templates/macOS-13.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.anka.pkr.hcl @@ -246,6 +246,7 @@ build { provisioner "shell" { scripts = [ "./provision/configuration/configure-hostname.sh", + "./provision/configuration/cleanup-brew.sh", "./provision/configuration/finalize-vm.sh" ] execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"