brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: pkgutil --files shows everything a macOS installer package put on your disk

macOS
~/tips/tip-macos-pkgutil-files

pkgutil --pkgs

Lists what a .pkg installer added to your Mac, so you can see where its files went.

Apps from a .pkg installer do not live neatly in one folder like a dragged-in app. They can spread files over /Library, /usr/local and more. macOS keeps a receipt of every package, and pkgutil reads it.

First find the package ID:

pkgutil --pkgs
pkgutil --pkgs='com\.example\..*'

The second form filters with a regular expression; mind the equals sign, the man page needs it there. Then list what that package installed:

pkgutil --files com.example.pkg.app

And pkgutil --pkg-info <id> prints extended information about the package.

By default these commands look at the startup disk. If a package went to another volume, add --volume /Volumes/Name to point them there.

That list is what I’d look at before removing an app that has no uninstaller. It shows exactly which paths to check, instead of guessing from a forum post. The man page also says the place where macOS keeps receipts can change, so I’d always ask pkgutil instead of digging through system folders.

Caveats. pkgutil --forget <id> only throws away the receipt and leaves every file where it is; it is not an uninstaller. And the list covers what the package put down at install time. Caches and settings the app created later are not in it.

Further reading: pkgutil man page

More macOS tips System Settings > Accessibility > Hover Text > When using the pointer A Smart Folder in Notes collects notes by tag, checklist or date Type # in a Mac note to tag it, then filter by tag in the sidebar tmutil isexcluded ~/Projects/app/node_modules Crop an image in Preview by dragging a frame and clicking Crop All macOS tips (99) All topics

Link