2

This question already has an answer here:

How I can parse the list of all Mac applications? I am executing:

ls /Library/Preferences/ > apps.txt

But still there are some apps that are missing from the list. I think it parse only user apps and do not parse common apps

marked as duplicate by grg macos Mar 27 '18 at 13:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • This folder does not contain references to all applications, so it‘s no surprise that some are missing. Actually applications can be installed/stored more or less anywhere, so searching for „*.app“ through locate or find might be the better approach – nohillside Mar 27 '18 at 9:51
8

system_profiler

To list all the applications on a Mac, use the system_profiler command:

system_profiler SPApplicationsDataType

This will output the command in human readable format:

   Power Manager:

      Version: 4.6.1
      Obtained from: Identified Developer
      Last Modified: 20/01/2018, 6:42 pm
      Kind: Intel
      64-Bit (Intel): Yes
      Signed by: Developer ID Application: Dragon Systems Software Limited, Developer ID Certification Authority, Apple Root CA
      Location: /Applications/Power Manager.app

This will include every application on the Mac, including many that are hidden within folders.

XML Formatted List

Add the -xml option to the command for a format that can be parsed and analysed by other tools:

system_profiler -xml SPApplicationsDataType

This will output a Property List (XML), such as:

        ...
        <dict>
            <key>_name</key>
            <string>Safari</string>
            <key>has64BitIntelCode</key>
            <string>yes</string>
            <key>info</key>
            <string>11.0.3, Copyright © 2003-2017 Apple Inc.</string>
            <key>lastModified</key>
            <date>2018-01-31T08:33:08Z</date>
            <key>obtained_from</key>
            <string>apple</string>
            <key>path</key>
            <string>/Applications/Safari.app</string>
            <key>runtime_environment</key>
            <string>arch_x86</string>
            <key>signed_by</key>
            <array>
                <string>Software Signing</string>
                <string>Apple Code Signing Certification Authority</string>
                <string>Apple Root CA</string>
            </array>
            <key>version</key>
            <string>11.0.3</string>
        </dict>
        ...
  • For example there are 2 admin users: Admin1 and Admin2. One of application is installed only for Admin2, in case I login as Admin1 and type system_profiler SPApplicationsDataType I will see and applications that are installed only for Admin2 ? – user277507 Mar 27 '18 at 12:10
  • I suspect you will see both but you should test the behaviour before relying on the output. This tool is used by Apple for debugging and profiling Macs, thus I believe it is as complete as it can reasonably be. – Graham Miln Mar 27 '18 at 13:50
-2

ls /Applications > apps.txt should do the trick if all you want is the application names. If you have applications installed for one user only (which is rare) you might have to do it again like ls /Users/username/Applications > apps.txt.

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