Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Apr 2003 08:49:38 -0500
From:      Mike Meyer <mwm-dated-1050155379.518e3a@mired.org>
To:        Konrad Scorciapino <fallenbr@uol.com.br>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Uninstalling dependencies
Message-ID:  <16017.33266.547939.388423@guru.mired.org>
In-Reply-To: <200304062034.14606.fallenbr@uol.com.br>
References:  <200304051954.06478.fallenbr@uol.com.br> <200304060902.42188.fallenbr@uol.com.br> <16016.23136.120779.936916@guru.mired.org> <200304062034.14606.fallenbr@uol.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help
In <200304062034.14606.fallenbr@uol.com.br>, Konrad Scorciapino <fallenbr@uol.com.br> typed:
> > Assuming you want to delete <portname> and any unused dependencies on
> > it:
> > pkg_info -R <portname> | sed 1,/Required/d > /tmp/deps
> > pkg_delete <portname>
> > pkg_delete $(cat /tmp/deps)
> Hmm.. I got no relevant output from pkg_info, look:
> konrad@localhost ~ > pkg_info -R gnome-1.4.1b2_2
> Information for gnome-1.4.1b2_2:
> konrad@localhost ~ >
> 
> What could be possibly wrong?

I think it's a communications error. I've got the
dependencies/dependents backwards from what you want. You don't want
to delete the packages that require gnome, you want to delete the
packages that it requires - but only if they aren't in use by
something else.

That's a noticably harder proposition.

Try

# cd /var/db/pkg
# find . -name +REQUIRED_BY | xars grep -l gnome-1.4.1b2_2 > /tmp/pkgs
# pkg_delete gnome-1.4.1b2_2
# pkg_delete $(cat /tmp/pkgs)

You have to delete gnome first, otherwise it requiring the other
packages will cause them to not be deleted. This should delete all the
packages required by gnome that aren't required by other packages.

Of course, pkg_deinstall in the portupgrade port will do this as with
one command.

	<mike
-- 
Mike Meyer <mwm@mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16017.33266.547939.388423>