2

I want to find all .app files on my Mac that aren't in the Applications folder. How do I do this?


Please unmark as duplicate

1st point: The suggested dupe's answer explains how to get a list of all applications installed, but does not explain how to exclude the Applications folder.

  1. How do I find all files of a specific type that are outside of a folder?
  2. I want to find all .app files on my Mac that aren't in the Applications folder. How do I do this?

2nd point: This is a 2-part question. The 1st part is a generic question that asks how to find ANY files of a certain kind not in a folder. The 2nd part is the situation specific to myself. The suggested dupe partially solves my own problem but doens't address the generic question.

https://meta.stackexchange.com/questions/217115

3rd point: Furthermore, a key word in this question is "find." The suggested dupe's answer works to get a list of all installations, but it's not possible to get to where they're stored on the disk.

  • 1
    Heavily edited to focus on the specific problem you've described in your edit. If the answers you get don't help you to solve the more general aspect please ask a new question for this. – nohillside Feb 16 at 9:09
5

Basically you take the list of applications found and filter out those who are in /Applications:

find / -type d -iname *.app | grep -v '^/Applications' > ~/applications.txt

The more elaborated way skips /Applications from the start and just lists .apps found in other directories:

find / -type d \( \( -depth 1 -name Applications -prune \) -o -name '*.app' -print \)

In both cases you might get warning messages if find tries to descend into a directory not accessible to the current user. You can prevent this by running the command with sudo.

  • 1
    I highly prefer the second one (you don't scan a directory for nothing). – dan Feb 16 at 12:51
2

Here's another solution using find. We negate the predicate -path with an !- exclamation point. Use the -x option to prevent descending into other devices (filesystems) and send any error messages to the bit bucket- 2>/dev/null.

find -x / ! -path '/Applications/*' -type d -name '*.app' 2>/dev/null

You must log in to answer this question.

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