Cleaning Out Ports?

Michael C. Shultz reso3w83 at
Mon Jan 31 18:27:21 PST 2005

On Monday 31 January 2005 06:16 pm, Matt LaPlante wrote:
> Well what I'm more concerned with is how would you locate orphaned
> dependencies after the fact.  For a parallel example, in gentoo you
> would "emerge --depclean" which searches the tree for any orphaned
> packages and removes them.  So say I hadn't used the -r flag when
> removing packages on BSD, how could I find the leftovers later?
Look at /usr/ports/sysutils/pkg_cutleaves

here is a excerpt from its man page:

"pkg_cutleaves  finds  installed 'leaf' packages, i.e. packages that are
 not referenced by any other installed package, and lets you decide  for
 each  one  if  you want to keep or deinstall it (via pkg_deinstall(1)).
Once the packages marked for  removal  have  been  flushed/deinstalled,
 you'll  be  asked  if  you want to do another run (to see packages that
 have become 'leaves' now because you've deinstalled the package(s) that
 depended  on  them).  In every run you will be shown only packages that
 you haven't marked for keeping, yet."

> --
> Matt LaPlante
> System Administrator
> Center for Automation Technologies
> RPI/CAT, CII 8015
> 110 8th Street
> Troy, NY 12180
> Phone: (518) 276-2275
> laplante at
> > -----Original Message-----
> > From: Pat Maddox [mailto:pergesu at]
> > Sent: Monday, January 31, 2005 8:55 PM
> > To: Matt LaPlante
> > Cc: freebsd-questions at
> > Subject: Re: Cleaning Out Ports?
> >
> > If you try to remove a package that has child dependencies, then
> > it'll let you know.  You'll have to use the -f flag to force it to
> > delete the package, despite there being any dependencies.  If you
> > want to delete a package along with all its dependencies, you can
> > use the -r flag.
> >
> > Use pkgdb -F to fix any dependencies that might be broken.
> >
> > I think that's about right.  I'm a FreeBSD newbie :)
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list