- How to remove applications from mac with a terminal for mac#
- How to remove applications from mac with a terminal install#
- How to remove applications from mac with a terminal full#
DMG has to be mount to read the contents and un-mount when done.
What gets installed is the installers inside DMG. This is one way to do a complete removal.ĭMG are not installer files. Most of them do a search in known directories (like /Library/Preferences, /Library/Application Support etc) with the app name/pkg name or bundle identifier. On OS X 10.10 Yosemite and earlier, it was possible to open a terminal window and issue commands to delete these system apps, which are located in the /Applications folder.
How to remove applications from mac with a terminal install#
There are few uninstall/cleaner apps available on OS X. Macs also have no way to uninstall or install operating system features, so there’s no way to easily remove the many applications Apple included with your Mac. The links given below will give you some info It can extract the scripts and other related information.
As a layman we cannot go ahead and uninstall a PKG.īut at the same time there are command lines that can do a complete reverse engineering on PKG files. What is done in PKG scripts is always upto the PKG creator. A PKG/MPKG can have certain pre install and post install scripts associated with that. You can also open Terminal by using spotlight in the right hand top corner. The concept of PKG uninstallation is not there in OS X. Look for Terminal in Applications Utilities Terminal. Once you've uninstalled the files, you can remove the system record of that package: $ sudo pkgutil -forget package-name.pkg But some people will need to tweak the command line, so it's better to be clear!) $ pkgutil -only-dirs -files package-name.pkg | tr '\n' '\0' | xargs -n 1 -0 -p sudo rmdir (You should be safe with rmdir too, because it will only remove empty directories.
p causes xargs to prompt for confirmation, but don't get trigger-happy.
How to remove applications from mac with a terminal for mac#
The list of directories output by pkgutil -files can include important shared directories like usr, which you don't want to remove. On rare occasions, you may need to remove components of the host for Mac manually after uninstalling. $ pkgutil -only-files -files package-name.pkg | tr '\n' '\0' | xargs -n 1 -0 -p sudo rmīe careful of the next (final) step, which removes directories. Now you need to give the new file name, here you have two options. Follow the steps below to purge the application install.
How to remove applications from mac with a terminal full#
Use this to list the package's installed files: $ pkgutil -files package-name.pkgĪfter visually inspecting the list of files you can do something like this to remove them: $ cd / # assuming the package location is / Type mv then open Finder and drag the file on terminal (this is to copy the full path of file to the terminal) Note: Please do note that while dragging the file to terminal, make sure that the finder window and terminal window don’t overlap else this trick won’t work. The easiest way to uninstall the application is through a purge command in the terminal. To find the package location (the root directory that all file listings will be relative to), use $ pkgutil -pkg-info package-name.pkg I'm modifying answer, which didn't work for me.Īt a command line, use the following to find the desired package name: $ pkgutil -pkgs | grep -i is a string you expect to see in the package name.