Subject: pkg/24188: A utility for removing leaf packages
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/22/2004 01:02:45
>Number:         24188
>Category:       pkg
>Synopsis:       dependency packages are not removed when removing the dependend
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 21 23:03:00 UTC 2004
>Originator:     Roman Kennke
>Release:        NetBSD 1.6.1
System: NetBSD sunshine.localdomain 1.6.1 NetBSD 1.6.1 (GENERIC) #0: Tue Apr 8 12:05:52 UTC 2003 i386
Architecture: i386
Machine: i386
When installing a package from pkgsrc, a lot of additional packages may be
installed in order to satisfy dependency. When such a package is beeing
removed, the dependency packages remain on the system. Another example is
a package which depends on another package and in a later version that
dependancy is removed.
It is difficult to track all dependencies and remove the depended
packages manually, so after a while and a lot of installing and
deinstalling packages it is very likely, that you end up with a lot of
packages beeing installed that are not nessecary.
Install one big package, i.e. one of the meta-pkgs, say gnome2 or kde3 and
then remove this same package. Try to manually remove all the packages that
were pulled in as dependencies.
I have written a small script, which asks for every 'leaf' package if it should
be kept or if it can be removed, providing a package description where
necessary. I also have prepared and tested a pkgsrc package for that.
You may download it at and
unpack it in /usr/pkgsrc. This places the files for this package in