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 |
You could use apt-get to try and remove it. It supports wild cards.
apt-get --purge remove kernel-image-2.6* |
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:
|
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 |
Quote:
|
All times are GMT -5. The time now is 01:10 PM. |