LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Is there any way to display the full name of package via dpkg -l <package pattern> ? (https://www.linuxquestions.org/questions/debian-26/is-there-any-way-to-display-the-full-name-of-package-via-dpkg-l-package-pattern-166772/)

davidas 04-06-2004 05:19 AM

Is there any way to display the full name of package via dpkg -l <package pattern> ?
 
I'm trying to purge kernel-image, 2.6.5, but I guess the name of the package is longer than what is shown below, which is why I can't purge it successfully.

Any suggestion to know the exact name of the installed package via "dpkg -l <packagename pattern>", please?

Thanks !



david:/home/david# dpkg -l '*2.6.5*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
un kernel-doc-2.6 <none> (no description available)
ii kernel-image-2 1.0 Linux kernel binary image for version 2.6.5.
un kernel-source- <none> (no description available)

david:/home/david# dpkg -P kernel-image-2
dpkg - warning: ignoring request to remove kernel-image-2 which isn't installed

comp12345 04-06-2004 01:24 PM

You could use apt-get to try and remove it. It supports wild cards.

apt-get --purge remove kernel-image-2.6*

davidas 04-06-2004 06:51 PM

But if I have kernel-image-2.6.4 and kernel-image-2.6.5, will both be removed? Hoping to remove just one specific package, cos for other packages whose names are not completely displayed, doing a wildcard removal might remove alot more files of similar names.

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii kernel-image-2 1.1 Linux kernel binary image for version 2.6.4.
ii kernel-image-2 1.2 Linux kernel binary image for version 2.6.5.

Hence the need to have a wider Name column, or a way to display the complete name of the package in the query.

Thanks :)

Quote:

Originally posted by comp12345
You could use apt-get to try and remove it. It supports wild cards.

apt-get --purge remove kernel-image-2.6*


sims 04-07-2004 08:56 AM

Hehe, been looking for a simple way to do this myself. I know this one is ugly, but it works...
Code:

grep -B 1 "ok installed" /var/lib/dpkg/status | cut -d " " -f 2 | grep -v -- -- | grep -v install | grep kernel-image-2.6

comp12345 04-07-2004 10:00 PM

Quote:

Originally posted by davidas
But if I have kernel-image-2.6.4 and kernel-image-2.6.5, will both be removed? Hoping to remove just one specific package, cos for other packages whose names are not completely displayed, doing a wildcard removal might remove alot more files of similar names.

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii kernel-image-2 1.1 Linux kernel binary image for version 2.6.4.
ii kernel-image-2 1.2 Linux kernel binary image for version 2.6.5.

Hence the need to have a wider Name column, or a way to display the complete name of the package in the query.

Thanks :)

If you have more than one package fitting that description it, it will show a listing of all possible matches. Select no to cancel the removal, then run apt-get again with the full name of the package.


All times are GMT -5. The time now is 01:10 PM.