InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Mac Command Line tutorials

  • Bulk convert jpeg files to png using sips on mac
  • Custom terminal tab title and ssh on mac
  • How to convert text to speech on Mac using command line utility say
  • How to join multiple pdf files on Mac
  • How to use qpdf to add/remove password from pdf on mac
  • Install redis on Mac
  • Mac - find which process is listening on a port
  • Mac - hide and unhide a file or directory
  • Mac - open a terminal from a folder
  • Mac - print java home on command line
  • Mac - search files on command line using mdfind
  • Mac command line convert svg to png
  • Mac command line utility open - some handy tips for better productivity
  • Mac terminal - how to close shell on exit
  • mac pkgutil - quick start guide
 
  • Home
  • > Tutorials
  • > Mac
  • > Mac Command Line

mac pkgutil – quick start guide

By admin on Sep 27, 2015

pkgutil can be used to query Mac OS X Installer packages on Mac. This can be useful to get information about various packages and files. Here are some quick use cases where pkgutil can be used:

List all packages

To list all installed packages on mac:

$ pkgutil --pkgs

List files of a package

To lists files of a package:

$ pkgutil --files com.apple.pkg.JavaEssentials

To list only directories of a package:

$ pkgutil --files com.apple.pkg.JavaEssentials --only-dirs

List package name for a file

To list which package a file belongs to (if any):

 
$ pkgutil --file-info /bin/bash
volume: /
path: /bin/bash

pkgid: com.apple.pkg.BaseSystemBinaries
pkg-version: 10.10.0.1.1.1425657145
install-time: 1442975500
uid: 0
gid: 0
mode: 555

pkgid: com.apple.pkg.update.security.10.9.5.13F1112.2015.006
pkg-version: 1.0.0.0.1.1306847324
install-time: 1442777342
uid: 0
gid: 0
mode: 555

Note that you cannot query packages others than Mac OS X Installer packages using pkgutil.

Suggested posts:

  1. CSS max-width – limit maximum wodth of an element
  2. How to use CasperJS to automate website testing
  3. HTML import
  4. Git – how to undo last commit
  5. LXC (Linux Containers) – quick start tutorial on Ubuntu
  6. jQuery – find total number of DOM elements
  7. How to install and monitor memcache for php on Ubuntu Linux
  8. How to use rrdtool plot traffic from network interface
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Mac, Mac Command Line, Tutorials
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress