Skip to main content

PSA- do not install multipass using homebrew

·234 words·2 mins
Blog Homebrew Multipass
Mike Wyer
Author
Mike Wyer

Upgrading is a PITA.

I honestly gave up after inputting my password for the 17th time:

==> Upgrading multipass
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/c81eb9fe36cb066df5f6a2dae4b65e50aae0c051/Casks/m/multipass.rb
#################################################################################################################################### 100.0%
==> Downloading https://github.com/canonical/multipass/releases/download/v1.14.1/multipass-1.14.1+mac-Darwin.pkg
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/114128199/36d39554-bacb-4b14-aece-3efe302
#################################################################################################################################### 100.0%
==> Removing launchctl service com.canonical.multipassd
Password:
Password:
Sorry, try again.
Password:
Password:
==> Uninstalling packages with sudo; the password may be necessary:
com.canonical.multipass.multipassd
Password:
Password:
Password:
com.canonical.multipass.multipass
Password:
Password:
Password:
com.canonical.multipass.multipass_gui
Password:
Password:
Password:
Password:
==> Removing files:
/opt/homebrew/etc/bash_completion.d/multipass
Password:
/Applications/Multipass.app
Password:
/Library/Application Support/com.canonical.multipass
Password:
/Library/Logs/Multipass
Password:
Sorry, try again.
Password:
sudo: 1 incorrect password attempt
...

It still required another 6(!) password prompts to uninstall:

❯ brew uninstall multipass
==> Uninstalling Cask multipass
==> Removing launchctl service com.canonical.multipassd
Password:
==> Uninstalling packages with sudo; the password may be necessary:
==> Removing files:
/opt/homebrew/etc/bash_completion.d/multipass
Password:
/Applications/Multipass.app
Password:
/Library/Application Support/com.canonical.multipass
Password:
/Library/Logs/Multipass
Password:
/usr/local/bin/multipass
Password:
/usr/local/etc/bash_completion.d/multipass
Password:
==> Purging files for version 1.14.0 of Cask multipass

I had a quick look at the cask definition and I think it comes down to gain_permissions_remove only accepting a single path instead of a list. Thus forcing every single file delete to be separately sudo’d.

I bet they added the “wipe sudo cache after every operation” after deciding that “it’s ok to delete one file at a time because the sudo perms will be cached”.

Anyway, be aware that multipass has a bunch of different files and that managing them via homebrew is a nightmare.