Listing installed ports without any ports dependent on it
Adam
blueeskimo at gmx.net
Mon Jun 2 21:10:46 PDT 2003
On Mon, 2003-06-02 at 23:53, Joe Marcus Clarke wrote:
> It's not Python, but this script should work.
>
> #!/bin/sh
>
> for i in `pkg_info | cut -f1 -d ' '`; do
> if [ -z "`pkg_info -qR ${i}`" ]; then
> echo ${i}
> fi
> done
Excellent! This does exactly what I was after!
Here's how I run it:
echo Installed before:
pkg_info |wc -l
sleep 3
/home/eskimo/bin/pkg_nodeps.sh |less
echo Installed after:
pkg_info |wc -l
The basic idea is to thumb through the list and spot the ports that are
no longer needed, then copy & paste the port name to a seperate terminal
and pkg_delete it. This is a great way to efficiently remove unneeded
ports.
Thanks Marcus!
--
Adam <blueeskimo at gmx.net>
More information about the freebsd-questions
mailing list