alienator88 / Pearcleaner

A free, source-available and fair-code licensed mac app cleaner
https://itsalin.com/appInfo/?id=pearcleaner
Other
2.69k stars 62 forks source link

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

Closed gkrawiec closed 1 week ago

gkrawiec commented 3 weeks ago

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):

Additional context pearcleaner has "homebrew cleanup is enabled" on

alienator88 commented 3 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

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

alienator88 commented 2 weeks ago

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 commented 1 week ago

Release this in latest version.

gkrawiec commented 1 week ago

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

gkrawiec commented 5 days ago

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 commented 5 days ago

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