How to list all the installed packages in a MAC OS

Discussion in 'macOS' started by sarath, Nov 9, 2009.

  1. sarath macrumors newbie

    Joined:
    Aug 6, 2009
    #1
    Hi,

    I am testing a software which verifies for a package installation in the client(MAC client here) before proceeding with its job.The client software is to be configured first with the package it has to look for at the client.
    For this I want to check all the installed packages in a MAC OS.This applies to both Leopard and Snow leopard.

    I see there is a /Library/Receipts folder which contains a list of packages .But pkgutil when used gives a different list.Why is it so?Why does the list not match with the receipt folder contents?Is there any other way to get a wholesome list of all packages that are installed?

    Moreover what's with Snow Leopard?:eek: I do not see the receipts folder anymore.How can I list the installed packages in Snow Leopard?

    I greatly appreciate your help :)
     
  2. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #2
    Snow Leopard
    Things installed via package should visible here:

    /Library/Receipts/InstallHistory.plist

    You can open this with QuickView or TextEdit. But the Property List Editor that comes with XCode is the preferred method. XCode is of course free at developer.apple.com There is definitely a Receipts folder in Snow Leopard at /Library/Receipts. I am not sure why you don't see one. Hopefully you just overlooked it.

    This is actually very important as it is a change from Leopard. If you had some software in Leopard and upgraded to Snow Leopard, and then try to upgrade that software. The installer may not be able to see that you have an old version due to this change. I know of at least one Developer who has had to address this with their clients.

    Another location is /var/db/receipts

    Leopard
    In Leopard, /Library/Receipts

    Another location is /var/db/receipts

    Both
    A much easier way is this command:

    Code:
    pkgutil --pkgs
    This will give all packages. Running this through less will give you more readable output.

    Code:
    pkgutil --pkgs | less
    You can also see the files that were installed, for example:

    Code:
    pkgutil --pkgs com.apple.pkg.DVDPlayer | less
    As always, you can find out what else you can do with pkgutil by running:
    Code:
    man pkgutil
     

Share This Page