pkg command to remove multiple packages

Matthew Seaman matthew at
Sat Jan 25 10:32:11 UTC 2014

On 25/01/2014 10:15, James Griffin wrote:
> Hi
> With this new pkgng thing, if I use 'pkg delete -R -x xfce' will it
> remove all the stuff related to the xfce4 installation. I had to use
> ports to build xfce4 because there wasn't a meta-pkg to install (at
> least not that I could find), but i'm using kde4 now instead. Could do
> with the disk space.
> I guess that command won't find a few bits like thunar and some libs.

'pkg deinstall -R pkgname' deletes pkgname and everything that requires
pkgname, which is 90% of what you need.

The remaining 10% can be cleaned up by:

  pkg autoremove

This deletes packages that were installed solely to fulfill the
dependencies of pkgname -- if you're building your packages locally with
portmaster / portupgrade or similar, it should try and remove any build
dependencies[*] too, which may or may not be what you want.  Also, it
won't remove a package if something else has subsequently been installed
that also requires it.



[*] pkg(8) only ever considers run-time dependencies.

Dr Matthew J Seaman MA, D.Phil.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-questions mailing list