How to get a list of the installed app on my Mac? How I can parse the list of all Mac applications? I am executing:

ls /Library/Preferences/ &gt; 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
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:

        ...
        &lt;dict&gt;
            &lt;key&gt;_name&lt;/key&gt;
            &lt;string&gt;Safari&lt;/string&gt;
            &lt;key&gt;has64BitIntelCode&lt;/key&gt;
            &lt;string&gt;yes&lt;/string&gt;
            &lt;key&gt;info&lt;/key&gt;
            &lt;string&gt;11.0.3, Copyright © 2003-2017 Apple Inc.&lt;/string&gt;
            &lt;key&gt;lastModified&lt;/key&gt;
            &lt;date&gt;2018-01-31T08:33:08Z&lt;/date&gt;
            &lt;key&gt;obtained_from&lt;/key&gt;
            &lt;string&gt;apple&lt;/string&gt;
            &lt;key&gt;path&lt;/key&gt;
            &lt;string&gt;/Applications/Safari.app&lt;/string&gt;
            &lt;key&gt;runtime_environment&lt;/key&gt;
            &lt;string&gt;arch_x86&lt;/string&gt;
            &lt;key&gt;signed_by&lt;/key&gt;
            &lt;array&gt;
                &lt;string&gt;Software Signing&lt;/string&gt;
                &lt;string&gt;Apple Code Signing Certification Authority&lt;/string&gt;
                &lt;string&gt;Apple Root CA&lt;/string&gt;
            &lt;/array&gt;
            &lt;key&gt;version&lt;/key&gt;
            &lt;string&gt;11.0.3&lt;/string&gt;
        &lt;/dict&gt;
        ...