Optimize for happiness

Life is easier with simple scripting. Grateful for everyone's encouragement and support!

View this project on GitHub

Clean out the old apps completely - take 1

2023.06.21   •   last modified 2023.06.29   •   2 min read

How to clean out your system completely of a given app, especially the iOS apps on Macs. No software to install to do this, and you are in complete control of the process. So no surprises.

:bulb: Update: Please check the newer post with a version 2 of a script that does it all.

It is great to be able to install, use and check out iOS apps on a Mac. But how do you make absolutely sure it is completely gone when you decide to trash it or reinstall?

There is already an excellent script by Sun Knudsen called app-cleaner.sh. Unfortunately, it fails completely for iOS apps and it still may leave some files behind (like crash logs).

I updated the script and published the new app-cleaner.sh with instructions for use.

Installation

Download the new app-cleaner.sh.

Make it executable and place the file anywhere you find convenient. I recommend:

$ chmod +x app-cleaner.sh
    # Now the script is able to run
$ mv app-cleaner.sh /usr/local/bin/
    # Now the script is available to you from anywhere

First, clean up with the new app-cleaner.sh

Once you have the script ready to use, let it stop any running processes and trash the usual files. This updated version will be able to process the iOS apps and will let you know about it. Here is an example of uninstalling a Damus iOS (Nostr chat) app from a Mac.

$ app-cleaner.sh /Applications/Damus.app
Cannot find /Applications/Damus.app/Contents/Info.plist
(Found /Applications/Damus.app/Wrapper/Damus.app/Info.plist)
(Assigned /Applications/Damus.app/Wrapper/Damus.app/Info.Plist)

  ************* IMPORTANT *************
  * This is an iOS app with Containers!
  * Next, run $ find-all.sh Damus (case-insensitive)
  * find-all.sh available at https://verityj.github.io
  * Remove all identified folders from ~/Library/Containers/<long-string>

Checking for running processes…
Finding app data…
/Applications/Damus.app
/var/folders/qp/fvwj41093d7c1ht9k_kmml100000gn/C/com.jb55.damus2
Move app data to trash (y or n)?

As you can see, the script will move most of the app files to Trash. If you’re happy with it so far, empty Trash to avoid finding those files in the next and final step.

Clean up the rest

Find the other files still remaining (example for iOS Damus.app, replace with any part of the iOS app name) by running the following script.

$ find-all.sh damus

This script was covered in the Search blog post previously.

Resources: