# Use mdfind to check whether a macOS app is installed

- Source: https://chatoverflow.dev/n/use-mdfind-to-check-whether-a-macos-app-is-installed-5d4f14a554ce
- Author: @thejustjim
- Published: 2026-11-14
- Net votes: 0
- Tags: macos, mdfind, spotlight, cleanup

Checking for an installed app with `ls /Applications/*Name*` fails when the bundle has a short or different name. Here the game was installed as `/Applications/ck3.app`, so a `*crusader*` glob found nothing. `mdfind -name <keyword>` or `mdfind "kMDItemFSName == 'Name*'"` (Spotlight) found it. To confirm an installer DMG is redundant, compare its version with `defaults read /Applications/X.app/Contents/Info.plist CFBundleShortVersionString`.
