Help needed uninstalling / reinstalling ports

Ryan Schmidt ryandesign at macports.org
Sun Sep 6 05:08:46 PDT 2009


On Sep 5, 2009, at 20:14, Michael_google gmail_Gersten wrote:

> I'm running into lots of issues trying to get gtk2 to install; it
> keeps generating an invalid cache.
>
> So, I figured I'd uninstall, and re-install, all of the packages that
> it uses -- to make sure that everything is up to date, and +universal.
>
> But I'm stuck on a few of them:
> Kleiman-ibook:trunk michael$ sudo port -p uninstall -f pkgconfig cairo
> fontconfig freetype glib2 jpeg tiff libiconv libpng jasper atk pango
> gettext zlib xorg-libXi xorg-libXrandr xorg-libXcursor
> xorg-libXinerama xorg-libXdamage xorg-libXcomposite xorg-libXfixes

If you want to force an uninstallation, "-f" needs to go before the  
word "uninstall", not after.


> --->  The following versions of fontconfig are currently installed:
> --->  	fontconfig @2.7.1_0+macosx
> --->  	fontconfig @2.7.2_0+macosx
> --->  	fontconfig @2.7.2_0+macosx+universal (active)
> Error: port uninstall failed: Registry error: Please specify the full
> version as recorded in the port registry.

MacPorts doesn't know which of these three fontconfigs you want it to  
uninstall. Specify it:

sudo port uninstall fontconfig @2.7.1_0+macosx


> I was not aware that upgrading packages does not uninstall the now
> out-of-date package.

That is correct. This makes it easy for you to return to the old  
version of the package, should you need to do so. When you are certain  
you don't need to go back to the old version, you can uninstall it. If  
you do not want the old version retained on upgrade, use "-u", e.g.:

sudo port -u upgrade fontconfig

would upgrade fontconfig and uninstall the old version. I routinely  
use "sudo port -u upgrade", but sometimes I wish I hadn't when I  
realize I do need to go back and test something with an older version.


> And, it's blocking progress.
>
> But, all is not lost. RT?M, and I find the -u option -- uninstall
> inactive ports when upgrading/uninstalling.
>
> Kleiman-ibook:trunk michael$ sudo port -u -p uninstall -f pkgconfig
> cairo fontconfig freetype glib2 jpeg tiff libiconv libpng jasper atk
> pango gettext zlib xorg-libXi xorg-libXrandr xorg-libXcursor
> xorg-libXinerama xorg-libXdamage xorg-libXcomposite xorg-libXfixes
> --->  The following versions of fontconfig are currently installed:
> --->  	fontconfig @2.7.1_0+macosx
> --->  	fontconfig @2.7.2_0+macosx
> --->  	fontconfig @2.7.2_0+macosx+universal (active)
> Error: port uninstall failed: Registry error: Please specify the full
> version as recorded in the port registry.
> --->  The following versions of freetype are currently installed:
> --->  	freetype @2.3.8_0+macosx+universal
> --->  	freetype @2.3.9_0+macosx+universal
> --->  	freetype @2.3.9_1+macosx+universal (active)
> Error: port uninstall failed: Registry error: Please specify the full
> version as recorded in the port registry.
> --->  The following versions of libiconv are currently installed:
> --->  	libiconv @1.12_2+universal
> --->  	libiconv @1.13_0+universal (active)
> Error: port uninstall failed: Registry error: Please specify the full
> version as recorded in the port registry.
> --->  The following versions of libpng are currently installed:
> --->  	libpng @1.2.35_0+universal
> --->  	libpng @1.2.38_0+universal (active)
> Error: port uninstall failed: Registry error: Please specify the full
> version as recorded in the port registry.
> --->  The following versions of zlib are currently installed:
> --->  	zlib @1.2.3_2+universal
> --->  	zlib @1.2.3_3+universal (active)
> Error: port uninstall failed: Registry error: Please specify the full
> version as recorded in the port registry.
> --->  The following versions of xorg-libXrandr are currently  
> installed:
> --->  	xorg-libXrandr @1.2.3_0+universal
> --->  	xorg-libXrandr @1.3.0_1+universal (active)
> Error: port uninstall failed: Registry error: Please specify the full
> version as recorded in the port registry.
> --->  Uninstalling autoconf @2.63_0+universal
> --->  Uninstalling automake @1.10.2_0+universal
> --->  Uninstalling fontconfig @2.7.1_0+macosx
> --->  Uninstalling fontconfig @2.7.2_0+macosx
> --->  Uninstalling freetype @2.3.8_0+macosx+universal
> --->  Uninstalling freetype @2.3.9_0+macosx+universal
> --->  Uninstalling libiconv @1.12_2+universal
> --->  Uninstalling libogg @1.1.3_2+universal
> --->  Uninstalling libpng @1.2.35_0+universal
> --->  Uninstalling libsdl @1.2.13_5+universal
> --->  Uninstalling libtheora @1.0_0+universal
> --->  Uninstalling libvorbis @1.2.0_1+universal
> --->  Uninstalling m4 @1.4.12_1+universal
> --->  Uninstalling p5-locale-gettext @1.05_0+universal
> --->  Uninstalling perl5.8 @5.8.9_2
> --->  Uninstalling python25 @2.5.4_0+darwin_9+macosx+universal
> --->  Uninstalling python_select @0.2.1_0+darwin_9
> --->  Uninstalling tcl @8.5.6_0+darwin
> --->  Uninstalling Xft2 @2.1.13_2
> --->  Uninstalling xorg-bigreqsproto @1.0.2_0
> --->  Uninstalling xorg-inputproto @1.5.0_0
> --->  Uninstalling xorg-libX11 @1.2_0+universal
> --->  Uninstalling xorg-libXau @1.0.4_0+universal
> --->  Uninstalling xorg-libXdmcp @1.0.2_0+universal
> --->  Uninstalling xorg-libXext @1.0.5_0+universal
> --->  Uninstalling xorg-libXrandr @1.2.3_0+universal
> --->  Uninstalling xorg-randrproto @1.2.1_0
> --->  Uninstalling xorg-renderproto @0.9.3_0
> --->  Uninstalling xorg-xcmiscproto @1.1.2_0
> --->  Uninstalling xorg-xextproto @7.0.5_0
> --->  Uninstalling xorg-xf86bigfontproto @1.1.2_0
> --->  Uninstalling xorg-xproto @7.0.14_1
> --->  Uninstalling xorg-xtrans @1.2.3_0
> --->  Uninstalling xrender @0.9.4_5+universal
> --->  Uninstalling XviD @1.1.3_1+universal
> --->  Uninstalling zlib @1.2.3_2+universal
> Kleiman-ibook:trunk michael$
>
> That's not what I wanted. That's still not uninstalling what I wanted,
> and it uninstalled a bunch more that I don't know if I wanted removed
> or not.

I believe it did what you asked: it tried to uninstall various ports  
you requested, could not because it did not know which of multiple  
available versions of those ports to uninstall, proceeded despite  
errors because you used "-p", and then uninstalled inactive ports  
because you used "-u".

The fact that we allow "-u" with "sudo port uninstall" seems weird to  
me. As Mark pointed out, "sudo port uninstall inactive" does the same  
thing.


> So, how do I get rid of the unwanted duplicates? And, how do I check
> to see if I've clobbered something I needed with that last command?

I think you've only uninstalled the inactive ports so far, so that  
should not have any negative effect on anything.


On Sep 5, 2009, at 20:39, Michael_google gmail_Gersten wrote:

> Even better-- repeating the same command succeeds the second time.

Yes, because now that the inactive versions of the ports are gone,  
e.g. "sudo port uninstall fontconfig" can do so because there is only  
one version of fontconfig installed now and so there is no ambiguity  
that it needs you to resolve.




More information about the macports-users mailing list