Un-GNOME-ing a FreeBSD box

Paul Chvostek paul+fbsd at it.ca
Sat Dec 11 18:50:28 PST 2004


On Sat, Dec 11, 2004 at 06:54:18PM -0700, Brett Glass wrote:
>
> Which, by the way, is what the owner of the machine is seeing. He's
> listed the ports that were installed by running pkg_info, and is
> laboriously visiting each one's directory and trying to do a
> "make deinstall".

Perhaps you know this already, but you can probably get a good idea of
what all was installed during this event by looking of the timestamps of
directories inside /var/db/pkg/.  A dependency tree is vital in many
cases, but not so much in this one -- you basically just want the list,
without the ports that were already installed but may still be
dependencies of what was installed.

Once you have sanity-checked the list, just pkg_delete the whole batch,
all on a single command line.  If a dependency of something you're
deleting is also being deleted, pkg_delete should know not to complain.

> a clean, hierarchical tree but rather more of a "web". If there's
> a circular dependency, he's stuck.

Hence the value of dealing with these en masse rather than dependency by
dependency.  There should not be any circular dependencies in the ports
tree; that would be really awkward.

> Again, I really find it hard to believe that there would be no
provision
> for deleting a port AND the ports on which it depends cleanly. I tend
> to use a minimal number of ports and packages, and so didn't realize
> that this was such a difficult thing until now.

The problem is the age old one of unix assuming that if you do
something, it's because you wanted to do it.  There are lots of tricks
folks will tell you of how to back out, but none of them are guaranteed
to be clean, because what your friend did was simply a bad thing to do.
Dump compost in your living room, then find the "undo" key.

The ports system is designed to allow you to install and upgrade what
you need in order to make sure you can do what you want with your
system.  That kind of activity is *far* more common than cleaning up
messes like the one your friend has.  If more people dumped compost in
their living rooms, I'm sure carpet manufacturers, Dirt Devil, Hoover,
etc would come up with tools to help them back out of such a change to
their environment.

-- 
  Paul Chvostek                                             <paul at it.ca>
  it.canada                                            http://www.it.ca/



More information about the freebsd-questions mailing list