18 Mar 2024 ~ 1 min read

List and uninstall pkgs with pkgutil


How to see and manually remove all files installed with a pkg?

  • List all installed packages: pkgutil –pkgs
  • Show package info for special one: pkgutil –pkg-info <package-id>
  • List all files and folders installed with this package: pkgutil –files <package-id>
  • List only files: pkgutil –only-files –files <package-id>
  • List only folders: pkgutil –only-dirs –files <package-id>
  • Check files and folder names and manually remove it with rm -rf or rmdir, please be careful and do not remove important system folders!
  • Remove package from pgkutil db: pkgutil –forget <package-id>

https://gist.github.com/githubutilities/b5318d08a4b970d104f1

http://superuser.com/questions/36567/how-do-i-uninstall-any-apple-pkg-package-file


Headshot of Jurij Schlaht

Hi, I'm Jurij. I'm a web developer, macOS system administrator, photographer and soon also data engineer based in Frankfurt. You can follow me on Instagram, see some of my work on GitHub, or read more about me here on this page.