Remove the installed Pkg under Mac

Source: Internet
Author: User

Installation and removal under Mac is much simpler and clearer than Windows, which is obvious in the DMG mode, but many times we use pkg to install it, which is a bit cumbersome to remove.

For example, I installed Golang this pkg for Go language compilation, after installation can be used, but installed a tool chain, not an application software. So in the application directory is not content, you can find the installation in the/usr/local/go directory, but whether all the content is installed in this directory? The purpose of my removal of this pkg is to use the source code to directly compile the tool chain to apply, if there are some other configuration files missing, may lead to subsequent configuration problems.

After some searching and learning, there are two ways to find out:

1. Using the Pkgutil command

First run Pkgutil--pkgs | grep-i go, This will list the pkg containing the go word

Here we can see that after running the command list all the names containing "go" pkg, where com.googlecode.go is our Golang pkg, that is, we want to delete the pkg.

Then run pkgutil--files com.googlecode.go This command, this command will list all the installed pkg files, according to this list can be guaranteed to delete clean, no trouble.

For example, Golang pkg, although there is a long list, we can still summarize, in addition to/usr/local/go, there are etc/paths.d/go this file needs to be deleted.

2. Use the tool directly, so that you can fool a button to get it done:http://www.corecode.at/uninstallpkg/


In addition to these two methods, there are other methods, but I think these two methods are relatively clear and simple. The first method is mainly manual deletion, suitable for skilled senior engineers; The second method is one-click, which is suitable for all players.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Remove the installed Pkg under Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.