1

I want to be able run apps and tools in containers or virtual environments.

When working with python projects for example, i always make a virtual environment and that helps keep things clean (i.e. once i delete the virtual environment there is no sign of the app).

I am not asking for how to sandbox apps, security is not my concern, instead I want to be able to delete everything connected to that app when I don't want it anymore.

Things I have thought about:

  • Install apps with brew whenever possible (i believe that brew uninstall cleans properly).

  • Run apps from their DMG file without copying to /Applications directory (I don't know if this actually helps with anything).

  • Use the AppCleaner app, (I am using it currently) which is not bad but is solving the symptoms rather than the cause.

After some months of usage I always find my Mac full of useless stuff, not documents nor personal data but apps, tools like IDE, compiler, a one-time app. So I ended up doing a clean format.

Any suggestions?

1

Prefer using Homebrew and Homebrew-Cask whenever available.

For GUI apps, prefer using brew cask zap app_name instead of standard brew cask uninstall app_name.

Excerpt from man brew-cask:

zap token [ token ... ]
    Unconditionally remove all files associated with the given Cask.

    Implicitly performs all actions associated with uninstall, even if the Cask does not appear to be currently installed.

    Removes all staged versions of the Cask distribution found under <Caskroom_path>/token.

    If  the  Cask  definition  contains  a zap stanza, performs additional zap actions as defined there, such as removing local preference files. zap actions are variable, depending on the level of detail defined by the Cask author.

    zap may remove files which are shared between applications.

Running apps from DMG isn't a safeguard as residual files may still be left in ~/Library and other places depending on the app.

AppCleaner works fine almost all the time.

To keep your Mac responsive and free from unnecessary files occupying disk space, make it a point to install apps via above mentioned approaches and remove them as soon as you are done trying them out. This will keep you from resorting to performing a fresh operating system install frequently.

CCleaner is quit effective in getting rid of unneeded files.

However refrain from installing MacKeeper as it is widely considered to be a malware and hard to get rid of.

  • Thanks to /etc/hosts i never have to even see MacKeeper ever again :) As for cask zap, could you explain what the "zap" part does? – Fanckush Mar 30 '18 at 18:38
  • Updated the answer to include excerpt from brew-cask man page. – Nimesh Neema Mar 30 '18 at 18:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .