diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh index ab6b4afffc..4a47df700c 100644 --- a/Library/Homebrew/cmd/vendor-install.sh +++ b/Library/Homebrew/cmd/vendor-install.sh @@ -365,4 +365,11 @@ homebrew-vendor-install() { lock "vendor-install-${VENDOR_NAME}" fetch install + + # Bootsnap needs cleaned up on a new Ruby version. + # It's cleaned up by every `brew cleanup` run anyway so not a big deal to do it here, too. + if [[ "${VENDOR_NAME}" == "ruby" ]] + then + rm -rf "${HOMEBREW_CACHE}/bootsnap" + fi }