I have a headless FreeBSD server where some port has installed tons of X11-related packages. I would like to find out what these ports are so I can get rid of the unwanted X-related packages. Is there a way to figure this out?
You can use wildcards to avoid specifying the name with the version number:
Note that this does not work recursively, and thus you need to do
Note that on servers it is often a good idea to put the following in
That will make most (all?) ports to skip dependencies to any X11 related stuff.
The current accepted answer is out of date. FreeBSD has replaced its legacy packaging tools with pkgng.
Here's the new way to query the reverse-dependencies of a package: