Removing mercurial's pkg installation from my MacOSX and replacing it with the corresponding MacPorts port

Kevin Bullock kbullock+mercurial at ringworld.org
Thu Jun 16 11:23:57 CDT 2011


On Jun 16, 2011, at 5:26 AM, David Champion wrote:

> * On 15 Jun 2011, Marko K??ning wrote: 
>> Hi,
>> 
>> how do I safely remove hg from my MacOSX without leaving any traces? (Mercurial had previously been installed via a mpkg from http://mercurial.berkwood.com!)
>> 
>> (I want to switch over to MacPorts which would automatically take care of any updates.)
> 
> To see what mercurial packages are installed:
> 
> $ pkgutil --pkgs | grep mercurial
> 
> To remove the files for a package:
> 
> $ pkgutil --files org.pythonmac.mercurial-platlib-py2.6-macosx10.6 \
> 	| sort -r \
> 	| perl -ne 'chomp and unlink or rmdir'

...which is a good trick, except that the package manifests are _relative_ paths. So you need to know that the platlib files go in /Library/Python/2.6/site-packages/ (on 10.6), the data package (manpages) goes in /usr/local/share/man, and the scripts package (the 'hg' executable itself) goes in /usr/local/bin/.

pacem in terris / mir / shanti / salaam / heiwa
Kevin R. Bullock



More information about the Mercurial mailing list