Date: Tue, 4 Aug 2009 22:37:46 +0000 From: "b. f." <bf1783@googlemail.com> To: freebsd-questions@FreeBSD.org Subject: Re: not dead [yet]. Message-ID: <d873d5be0908041537v5091214dma9a0278e4a0fce00@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Roland Smith <rsmith at xs4all.nl> wrote: >What you can do is make a list of all installed ports with ports-mgmt/portmaster: > portmaster -L >ports.list > >Looking through this list, you'll see four categories; >- Root ports (No dependencies, not depended on) >- Trunk ports (No dependencies, are depended on) >- Branch ports (Have dependencies, are depended on) >- Leaf ports (Have dependencies, not depended on) > >Basically, you can delete any of the leaf and root ports, because >they're not depended on. E.g. if you have the following in your list as >a leaf port: > ===>>> qemu-0.10.6 >you can execute 'pkg_delete -d qemu-0.10.6' as root, and it is gone. If you're only interested in deletion, "-l" should be preferred to "-L". And portmaster with these flags does not always account for build dependencies. so with this method you may occasionally remove a port that is only used to build other ports, but is not a runtime dependency of any other port. Also, occasionally a port Makefile doesn't properly account for some dependencies, and removing them will break the port. So there may be some breakages that you'll have to fix, but this shouldn't happen often. When removing ports, I sometimes use pkg_deinstall -vR, sometimes also with -i. because it can clean out the now-unneeded dependencies of the port I'm removing, which speeds up this process. Provided your pkgdb and portsdb are up-to-date, it's a little better than portmaster -s, which relies on +REQUIRED_BY to detect stale dependencies, and may occasionally fail. b.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d873d5be0908041537v5091214dma9a0278e4a0fce00>