tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg_delete -A does not work



It seems to me that "pkg_delete -A" doesn't work as it is documented.

     -A    Recursively remove all automatically installed packages that
           were needed by the given packages and are no longer required.
           See also the -R flag.

Example is below. Package abcde is installed. All dependencies including
id3lib are marked as "installed as a dependency".  abcde depends on
id3v2 which in turn depends on id3lib.  After "pkg_delete -A abcde"
id3lib is kept installed and nothing depends on it (see pkg_leaves
output). Did I miss something?

pkg_bin_summary is from pkg_summary-utils, it is a wrapper
over pkg_info -XB.

   # pkg_bin_summary -f PKGNAME,PKGPATH,REQUIREDBY,DEPENDS,automatic abcde 
id3v2 id3lib
   PKGNAME=abcde-2.3.99.7
   DEPENDS=cd-discid>=0.7
   DEPENDS=id3-[0-9]*
   DEPENDS=id3v2-[0-9]*
   DEPENDS=cdparanoia>=3.0.9.7
   DEPENDS=mkcue>=2.1
   DEPENDS=gsed>=4.2
   DEPENDS=bash-[0-9]*
   PKGPATH=audio/abcde

   PKGNAME=id3v2-0.1.12
   REQUIREDBY=abcde-2.3.99.7
   DEPENDS=id3lib>=3.8.3nb1
   PKGPATH=audio/id3v2
   automatic=yes

   PKGNAME=id3lib-3.8.3nb5
   REQUIREDBY=id3v2-0.1.12
   PKGPATH=audio/id3lib
   automatic=yes

   # pkg_delete -A abcde
   gsed-4.2.1: unregistering info file /usr/pkg/info/sed.info
   bash-4.2: unregistering info file /usr/pkg/info/bash.info
   bash-4.2: removing /usr/pkg/bin/bash from /etc/shells
   # pkg_leaves
   id3lib-3.8.3nb5
   # pkg_bin_summary -f PKGNAME,PKGPATH,REQUIREDBY,DEPENDS,automatic id3lib
   PKGNAME=id3lib-3.8.3nb5
   PKGPATH=audio/id3lib
   automatic=yes

   #

Another example. 1) Check for auto-installed leaf packages, 2) remove
ctwm with a help of "pkg_delete -A", 3) check for leaf packages again.

ctwm is built with modular Xorg.

In this example "nih deps -rI" shows a dependency graph
of installed packages.

   # pkg_leaves
   # nih deps -rI ctwm | sort -k2 
   jpeg ctwm
   libXext ctwm
   libXmu ctwm
   libXpm ctwm
   m4 ctwm
   libICE libSM
   libXau libX11
   libXdmcp libX11
   libxcb libX11
   libX11 libXext
   libX11 libXmu
   libXext libXmu
   libXt libXmu
   libX11 libXpm
   libXext libXpm
   libXt libXpm
   libICE libXt
   libSM libXt
   libX11 libXt
   libXau libxcb
   libXdmcp libxcb
   # pkg_delete -A ctwm          
   m4-1.4.16: unregistering info file /usr/pkg/info/m4.info
   # pkg_leaves
   libXt-1.0.8
   libXext-1.1.1
   #

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index