Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APP] uninstall docker desktop that was installed with brew cask leaves symlinks #98

Closed
gkrawiec opened this issue Aug 17, 2024 · 10 comments

Comments

@gkrawiec
Copy link

I installed docker desktop using brew cask install.
Then I uninstalled with pearcleaner.
Brew showed it as still installed but with a bunch of broken symlinks.
brew cleanup did not help
but "brew uninstall --cask docker" afterwards fixed it.

App Details

  1. Docker desktop using brew formula https://formulae.brew.sh/cask/docker#default

Desktop (please complete the following information):

  • OS:
  • Pearcleaner App Mode: Regular
  • Pearcleaner Version: 3.8.5

Additional context
pearcleaner has "homebrew cleanup is enabled" on

@alienator88
Copy link
Owner

Hey, thanks for this. I'll take a look at this when I get a moment to see where the failure happens during cleanup.

@gkrawiec
Copy link
Author

NP. thank you. great app by the way!

here is another one that isn't completely gone

==> App
Missing App: /Applications/CotEditor.app
==> Binary
Broken Link: /usr/local/bin/cot``` 

@alienator88
Copy link
Owner

So from some testing I'm doing, it looks like the command fails on casks that require sudo to remove files.
Docker has a launchctl service and Cot puts the cot executable in /usr/local/bin.
Trying to see if I can work around that somehow. The problem I'm running into is if I make it run the brew command with admin privileges, it will ask the end user for their computer password for any cask uninstall, not only the ones that really require it. And that would be annoying. The 2nd problem is that I don't have a way to know if a cask will require admin privileges until it is executed using brew..

I'll keep playing with it and see, might need to separate the brew cleanup to just have it launch a terminal and run the commands from there automatically and the user can put in their password if needed.

@alienator88
Copy link
Owner

I think I have this working now.
I had to move the brew cleanup logic outside of Pearcleaner and just have the Terminal app execute it in order to account for casks that require sudo permissions. Could you test this DEBUG build for me and see how it works on your end?
Pearcleaner.zip

@gkrawiec
Copy link
Author

I am away from home for a few days. I will test as soon as I get back. thank you.

@alienator88
Copy link
Owner

No worries.
I tried to find other ways around having to use the Terminal for this, but unfortunately homebrew doesn't allow running commands with sudo directly anymore as a security feature. So I can't keep the whole cleanup process within Pearcleaner without asking the user for a sudo password. This will have to do for now. I'm not a fan of having to launch the Terminal to process the brew cleanup, but my hands are tied, unless I build a whole terminal emulator inside Pearcleaner which is overkill 😂

@alienator88
Copy link
Owner

Release this in latest version.

@gkrawiec
Copy link
Author

gkrawiec commented Sep 3, 2024

I will be back home later this week and will test this. I will use the new release instead of beta.
thank you.

@gkrawiec
Copy link
Author

gkrawiec commented Sep 7, 2024

I finally got to trying this update. I did not try it on docker as I am afraid it would damage my orbstack installation. I tried it on aldente which requires a password on bre. It seems it worked correctly. If I see another app causing problems I will let you know.
thank you for correcting this bug!
apologies for taking so long to test this.

@alienator88
Copy link
Owner

Awesome! And no problem, thanks for letting me know about this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants