Uninstalling dependencies
Mike Meyer
mwm-dated-1050155379.518e3a at mired.org
Mon Apr 7 06:49:41 PDT 2003
In <200304062034.14606.fallenbr at uol.com.br>, Konrad Scorciapino <fallenbr at 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 at localhost ~ > pkg_info -R gnome-1.4.1b2_2
> Information for gnome-1.4.1b2_2:
> konrad at 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 at mired.org> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
More information about the freebsd-questions
mailing list