Ports: Starting over from scratch?

Ceri Davies ceri at submonkey.net
Mon Dec 4 11:32:43 PST 2006


On Mon, Dec 04, 2006 at 01:05:08PM -0600, Drew wrote:
> I'm running into some problems on a desktop box that I've not seen anywhere
> else with upgrading multiple ports. The problem is so extensive, and a
> solution not being forthcoming, I'm very tempted to make deinstall from
> /usr/ports and then pkg_deinstall -a, and start over again. Does anyone have
> any advice or input on a procedure like this?

I did something similar recently when I decided to remove all traces of
kde and gnome from my desktop in favour of wmii.  Basically, I did the
following.

  o List all ports on the system
      pkg_info -E \* > /tmp/installed_ports

  o Edit the list, and delete every line except that which I know I want
	cp /tmp/installed_ports /tmp/required_ports
	vi /tmp/required_ports

  o Remove everything left in the file, letting the dependencies take
     care of keeping everything that I actually need
	pkg_delete `cat /tmp/required_ports`

  o Have pkgdb fix up any problems (there weren't any)
	pkgdb -Ff

In my case though, I didn't want the ports that were being removed.  It
sounds llike you do, in which case you could also save the origins of
the ports that you have installed and install them again afterwards.

To save the origins of all of your installed ports:
   pkg_info -oa | grep / > /tmp/port_origins

Then you can just throw them all back in with portinstall or similar.

Ceri
-- 
That must be wonderful!  I don't understand it at all.
                                                  -- Moliere
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20061204/d35f58ee/attachment.pgp


More information about the freebsd-questions mailing list