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

AppCleaner/AppZapper functionality on Uninstall #1005

Closed
exiva opened this issue Sep 11, 2013 · 20 comments
Closed

AppCleaner/AppZapper functionality on Uninstall #1005

exiva opened this issue Sep 11, 2013 · 20 comments

Comments

@exiva
Copy link
Contributor

exiva commented Sep 11, 2013

Any possibility to make the Uninstall command perform similar to, or have an option to make it work similar to AppCleaner or AppZapper where it removes associated files as well? Preferences, etc.

@acollign
Copy link
Contributor

This is something I also have in mind for a while now. So 👍

@vitorgalvao
Copy link
Member

Those apps are not exactly flawless. Apps divide associated files between various locations, and they don’t necessarily respect the same structure, which means you can’t simply look in specific places to find every one of them. Those apps (AppCleaner and similar) look in the usual places for files and directories with names that could be related to what you want to delete; this is why they ask (used to ask?) you to confirm the files to be deleted — if they’re too thorough, they can delete something they shouldn’t, while if they’re not, they’ll leave a lot of traces.

Homebrew-cask tries to do everything with as little interaction as possible from you (that’s the whole point). This means that there’s not an optimal way of going about that file cleaning, unless every cask specifies exactly what to delete. This is feasible, but it makes the entry process that much more difficult for newcomers, and is itself something that takes some trial and error for the people who implement it, since it’s not an exact process.

There’s also the need to take into account the people that do not want that to happen (another flag may need to be set), since this is not everyone wants, all the time.

@exiva
Copy link
Contributor Author

exiva commented Sep 11, 2013

Perhaps a method for handling the straggler files, and not finding everything would be to include some uninstall methods or scripts in the Cask files, perhaps when creating the cask you could say ok, Chrome uses ~/Library/foo, ~/Library/preferences/com.foo.plist, etc. and have those deleted if given a flag. Just throwing ideas out there. As far as Cask being something that requires little interaction, and not something wanted done all the time when uninstalling a cask... First off, how often do you uninstall a cask? Probably not very often, so adding a flag to uninstall isn't that big of a deal I think.

@vitorgalvao
Copy link
Member

I actually do it pretty often, both for testing purposes, and to try new casks that are added, but I agree that most people probably don’t uninstall casks that often, which is exactly where I was going — we’re adding (possibly a lot of) complexity for something that may not be worth it, particularly if it’s something that each contributor has to maintain, test, and update. AppZapper and AppCleaner are included in homebrew-cask, and they are specialised and centred around this very issue.

I’m not saying this shouldn’t be implemented, what I’m arguing is that it’s not simply a case of “let’s add this”, but rather “would this be desirable/feasible?”; “would it be truly useful?”; “would it stay in line with the goals of the project?”. Making the process as straightforward as possible is a central part of this project — if a simple Y/N question that happens rarely, warrants consideration, any kind of process that requires user interaction, however small, will not be implemented blindly.

@phinze
Copy link
Contributor

phinze commented Sep 15, 2013

Hey @exiva and @acollign - thanks for the idea. I agree that this is potentially a helpful feature.

I've always thought of casks as building up a consistent data model of the messy business of Mac package distribution, however we've also been treading carefully in uninstall territory, since the field diverges even more there. So as long as we are considering the implications properly, I'm happy to support us playing with this idea.

I think a good way to approach this would be to build up a PR that implements it for a few useful casks to see how it looks. That's how I approached install/uninstall originally and it was helpful to implement it in the context of a few examples.

@kevinSuttle
Copy link

Bump. I think this is the one thing holding others who are on the fence away.

@kevinSuttle
Copy link

Perhaps simply adding a --all-related-files flag with the uninstall command would help?

@vitorgalvao
Copy link
Member

@kevinSuttle The problem here is defining what are all the related files. We’d need to specify those in every cask, and finding them is the real issue.

@kevinSuttle
Copy link

Right, which is why maybe we lean on something like AppCleaner to handle it, which can be handled from the command line.

@leoj3n
Copy link
Contributor

leoj3n commented Jan 29, 2014

@cehoffman
Copy link

On the topic of tracking down files used by an application.

opensnoop is a tool that comes with the mac which will let you see what files any particular process is opening. Filtering out access of system files or just restricting reports to ~/Library, it should be much easier to find where an application is leaving extra files.

@kevinSuttle
Copy link

Any updates or decisions on this?

@luzpaz
Copy link
Contributor

luzpaz commented Apr 26, 2014

Related: #3132

@rolandwalker
Copy link
Contributor

This functionality is now being added in #4869.

However, it will be a little while until we are all actually using it. There is no interface yet (the planned interface is command brew cask zap). It will also depend on the relevant info being added to each Cask.

@rolandwalker
Copy link
Contributor

brew cask zap functionality is now in release v0.42.0

About 5% of Casks have zap stanzas, so there is plenty of work left to do. However, I think we can close this issue.

@designorant
Copy link
Contributor

Great work!

@kevinSuttle
Copy link

🍻

@mAAdhaTTah
Copy link
Contributor

Wow, this project has come a long way. Congrats.

@luzpaz
Copy link
Contributor

luzpaz commented Sep 18, 2014

👍 folks!

@acollign
Copy link
Contributor

Great news! 👍

@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests