Re: uninstalled packages in 'dpkg -l'
On Thu, 16 May 1996, Craig Sanders wrote: If you do this a lot, write a shell alias (bash aliases can't handle arguments, unfortunately), function or shell script to do it for you. NOTE: be wary of shell functions (and aliases too)...even if you define them in your ~/.bashrc so that they are available from the command line, they will NOT be exutable to programs forked by the shell. e.g. a function is not available in situations like 'find . -blahblah | xargs myfunction. xargs will have no idea what myfunction is. If you need to be able to call it from another program then write a script. This may be right but you can use shell functions if you use the '`' style of doing things ie. function fred() { echo 'hello' $i; } for i in `find . -name 'debian' -print` ; do fred $i ; done will generate the expected results. Joe.
Re: uninstalled packages in 'dpkg -l'
What can I do about this? dpkg --list 'ncurses*' | egrep -v '^un' Desired=Unknown/Install/Remove/Purge | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ NameVersionDescription +++-===-==- ii ncurses-base1.9.9e-1 Video terminal manipulation: Minimum set of ii ncurses-bin 1.9.9e-1 Video terminal manipulation: associated prog ii ncurses-term1.9.9e-1 Video terminal manipulation: additional term ii ncurses3.0 1.9.9e-1 Video terminal manipulation: shared librarie ii ncurses3.0-dev 1.9.9e-1 Video terminal manipulation: Developer's lib ii ncurses3.0-pic 1.9.9e-1 Video terminal manipulation: Shared-library -- Rob
Re: uninstalled packages in 'dpkg -l'
On Wed, 15 May 1996, Maarten Boekhold wrote: Hi, I always thought that 'dpkg -l' was supposed to show you all *installed* packages, but, when I do a: dpkg -l 'ncurses*' on my system, I get: Desired=Unknown/Install/Remove/Purge | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=bDesired=Unknown/Install/Remove/Purge | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ NameVersionDescription +++-===-==- un ncurses unknown (no description available) ii ncurses-base1.9.9e-1 Video terminal manipulation: Minimum set of ii ncurses-bin 1.9.9e-1 Video terminal manipulation: associated prog un ncurses-dev unknown (no description available) un ncurses-develop unknown (no description available) un ncurses-pic unknown (no description available) un ncurses-runtime unknown (no description available) ii ncurses-term1.9.9e-1 Video terminal manipulation: additional term un ncurses21-dev unknown (no description available) ii ncurses3.0 1.9.9e-1 Video terminal manipulation: shared Of these packages, all with a version of unknown are not installed, and I don't want these to show up either. They're confusing me. What can I do about this? Some of these are archaic packages from an earlier installation (0.93R6 for example). Once they are in the dpkg database they are not removed, even if they do not exist in your current package tree, unless you explicitly delete them from the /var/lib/dpkg/available and /var/lib/dpkg/status files. This is known problem and I think it is being attended to by the maintainer of dpkg. If you delete them by hand, you can at least clean things up a bit. Cheers, Carlo *** *Carlo U. Segre * * Department of Biological, Chemical and Physical Sciences * *Illinois Institute of Technology, Chicago, IL 60616 * * Voice: (312) 567-3498 FAX: (312) 567-3494* * [EMAIL PROTECTED] * ***
Re: uninstalled packages in 'dpkg -l'
On Wed, 15 May 1996, Maarten Boekhold wrote: I always thought that 'dpkg -l' was supposed to show you all *installed* packages, but, when I do a: dpkg -l 'ncurses*' on my system, I get: Desired=Unknown/Install/Remove/Purge | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=bDesired=Unknown/Install/Remove/Purge | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ NameVersionDescription +++-===-==- un ncurses unknown (no description available) [...remainder deleted...] Of these packages, all with a version of unknown are not installed, and I don't want these to show up either. They're confusing me. What can I do about this? pipe it through grep to get rid of the lines that you dont want. $ dpkg -l 'ncurses*' | grep ^ii\|^Desired=Unknown\|^|\|+++ Desired=Unknown/Install/Remove/Purge | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ NameVersionDescription +++-===-==- ii ncurses-base1.9.9e-1 Video terminal manipulation: Minimum set of ii ncurses-bin 1.9.9e-1 Video terminal manipulation: associated prog ii ncurses-term1.9.9e-1 Video terminal manipulation: additional term ii ncurses3.0 1.9.9e-1 Video terminal manipulation: shared librarie ii ncurses3.0-dev 1.9.9e-1 Video terminal manipulation: Developer's lib ii ncurses3.0-pic 1.9.9e-1 Video terminal manipulation: Shared-library or just 'dpkg -l ncurses* | grep -v unknown' might do it, but this would fail on packages which aren't unknown but which have failed to install. If you just want the installed packages, without the header info: dpkg -l ncurses* | grep ^ii If you do this a lot, write a shell alias (bash aliases can't handle arguments, unfortunately), function or shell script to do it for you. NOTE: be wary of shell functions (and aliases too)...even if you define them in your ~/.bashrc so that they are available from the command line, they will NOT be exutable to programs forked by the shell. e.g. a function is not available in situations like 'find . -blahblah | xargs myfunction. xargs will have no idea what myfunction is. If you need to be able to call it from another program then write a script. Craig