canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.64k stars 634 forks source link

Multipass aliases seems to be present even after uninstall and reinstall #3575

Open anuranjit opened 1 month ago

anuranjit commented 1 month ago

Describe the bug Local multipass got courrupted and the file system became read only. Post this removed all aliases and images and uninstalled multipass pass using "/Library/Application Support/com.canonical.multipass/uninstall.sh" and reinstalled multipass . The multipass alias command still shows aliases .

Expected behavior What did you expect to happen? There should not be any aliases post uninstall Logs multipassd.log

Additional info

Additional context Add any other context about the problem here.

ricab commented 1 month ago

Hi @anuranjit. I think you're right that we don't remove aliases on uninstall on macOS. That's something to fix indeed.

However, I don't understand what you mean by:

The multipass alias command still shows aliases .

If you uninstalled, the multipass command should not be available at all. Unless you reinstalled?

anuranjit commented 1 month ago

@ricab If run the command as below it still shows aliases

➜  ~ multipass aliases
Alias            Instance     Command          Context      Working directory
docker           docker-dev   docker           docker-dev   map
docker-compose   docker-dev   docker-compose   docker-dev   map

and when i try to unalias it says alias not found

➜  ~ multipass unalias docker
Nonexistent alias: docker.
➜  ~
ricab commented 1 month ago

Hmm I see. Do you have a Multipass folder in "~/Library/Application Support/"? And do you have a bin directory inside? If so, what are its contents?

anuranjit commented 1 month ago

@ricab

➜  ~ cd /Library/Application\ Support
➜  Application Support ls
App Store                       Logitech.localized              com.apple.TVIdleScreen
Apple                           Mica                            com.apple.backgroundassets.user
ApplePushService                Microsoft                       com.apple.idleassetsd
ArubaOnboard                    Mozilla                         com.canonical.multipass
BTServer                        ProApps                         com.expressvpn.ExpressVPN
CrashReporter                   Script Editor                   iLifeMediaBrowser
Fortinet                        VMware                          livefsd
Google                          com.apple.TCC                   zoom.us
➜  Application Support ls | grep multi
com.canonical.multipass
➜  Application Support cd com.canonical.multipass
➜  com.canonical.multipass ls
Resources    bin          lib          plugins      uninstall.sh
➜  com.canonical.multipass cd bin
➜  bin ls
multipass           multipassd          qemu-system-aarch64 sshfs_server
multipass.gui.app   qemu-img            qemu-system-x86_64
➜  bin
ricab commented 1 month ago

Hi @anuranjit, thanks but I meant in your home: "~/Library/Application Support/" (note the tilde at the beginning). But anyway, I believe we have enough to address this.

anuranjit commented 1 month ago

@ricab Any timeline for fix or any solution ?

ricab commented 1 month ago

I am afraid not @anuranjit. We are very busy with many things and I don't think this would be a very high priority. We'll try to do it, perhaps for one release after the one we are about to publish, but I can't make any promises.

That said, you should be able to remove your aliases manually. But I would need the contents of the folder I pointed to above to help you do that.

anuranjit commented 1 month ago

@ricab


Dock                                    Mozilla                                 com.apple.RemoteManagementAgent         com.nordvpn.macos                       zoom.us
➜  Application Support ls -ltr | grep multipa
drwxr-xr-x   4 anuranjit  staff   128 Mar 17  2023 multipass-client-certificate
drwxr-xr-x   3 anuranjit  staff    96 Mar 17  2023 multipass
drwxr-xr-x   3 anuranjit  staff    96 May 28 22:34 multipass-gui
➜  Application Support
➜  Application Support cd multipass
➜  multipass ls
bin
➜  multipass cd bin
➜  bin ls
docker                    docker-compose            docker-dev.docker         docker-dev.docker-compose docker.docker             docker.docker-compose
➜  bin ls -ltr
total 48
-rwxr-xr-x  1 anuranjit  staff  116 Jun  3 19:09 docker-dev.docker-compose
-rwxr-xr-x  1 anuranjit  staff  105 Jun  3 19:09 docker-compose
-rwxr-xr-x  1 anuranjit  staff  108 Jun  3 19:09 docker-dev.docker
-rwxr-xr-x  1 anuranjit  staff   97 Jun  3 19:09 docker
-rwxr-xr-x  1 anuranjit  staff  112 Jul 11 01:42 docker.docker-compose
-rwxr-xr-x  1 anuranjit  staff  104 Jul 11 01:42 docker.docker
➜  bin
ricab commented 1 month ago

Thank you @anuranjit, it is those docker* executables that are leftover and you can manually remove.

anuranjit commented 1 month ago

@ricab After doing that also

➜  bin ls
➜  bin multipass aliases
Alias            Instance     Command          Context      Working directory
docker           docker-dev   docker           docker-dev   map
docker-compose   docker-dev   docker-compose   docker-dev   map
➜  bin multipass aliases
ricab commented 1 month ago

Hmm, there is more to it then... Do you see a ~/Library/Preferences/multipass/multipass_aliases.json or similar? Anything relating to Multipass under ~/Library/Preferences?