Mac os list installed pklg1/5/2023 ![]() ![]() ![]() ☠️ Beware! Modifying the filesystem with root privileges can be hazardous. For smaller packages it is probably safer to just manually remove the files after visually inspecting the package file listing. Particularly, be aware that some packages may update shared system components, so uninstalling them can actually break your system by removing a necessary component. Nevertheless - and needless to say - extreme care should always be taken when removing files with root privileges. The following command could the be used to attempt removal of each directory, although be aware that when System Integrity Protection is active, there are some file paths that not even the root user may modify. To remove directories as well as files, list the directories from the package using: $ pkgutil -only-dirs -files the-package-name.pkg $ pkgutil -only-files -files the-package-name.pkg | tr '\n' '\0' | xargs -o -n 1 -0 sudo rm -i $ pkgutil -pkg-info the-package-name.pkg # check the location $ cd / # assuming the package is rooted at /. ![]() $ pkgutil -pkgs # list all installed packages $ pkgutil -files the-package-name.pkg # list installed filesĪfter visually inspecting the list of files you can do something like the following: In Snow Leopard, that location changed to /private/var/db/receipts.Īt some point - I’m not sure which - Apple added an easier-to-use solution in the form of pkgutil. To restore, for example, your MacPorts ports from the list generated above, use the following: port install $(cat ~/MacPorts.It used to be the case that you could install packages on Mac OS X by using lsbom to inspect the list of installed files recorded in the files under /Library/Receipts. Pkgutil -packages > ~/InstalledPackages.txt If you want a list of the binaries your terminal has access to, you can run the following commands to check the most common spots, and output the result as a text file: touch ~/Binaries.txtĪlternatively, if you just want to get the packages installed by MacPorts, run the following ( this is probably the one you want): touch ~/MacPorts.txtĪnd finally, for all packages installed by Installer touch ~/InstalledPackages.txt ![]() Since OS X has no package manager, anything you install would have been manual, through MacPorts or through Installer. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |