LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 04-06-2004, 05:19 AM   #1
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Rep: Reputation: 30
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
 
Old 04-06-2004, 01:24 PM   #2
comp12345
Member
 
Registered: Feb 2004
Posts: 467

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

apt-get --purge remove kernel-image-2.6*
 
Old 04-06-2004, 06:51 PM   #3
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Original Poster
Rep: Reputation: 30
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*
 
Old 04-07-2004, 08:56 AM   #4
sims
Member
 
Registered: Mar 2004
Location: Australia
Distribution: Debian, Ubuntu
Posts: 55

Rep: Reputation: 15
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
 
Old 04-07-2004, 10:00 PM   #5
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the Package Search pattern Syntax for dpkg --list? Akhran Debian 3 08-23-2005 05:23 AM
Troubles with dpkg and apt-get - bad package TTL_2 Linux - Software 1 08-13-2005 11:49 PM
dpkg: trying to overwrite `/bin/chgrp', which is also in package coreutils ahz Debian 3 05-26-2005 02:51 AM
DPKG and truncated package name list gjhicks Debian 2 07-20-2004 01:02 AM
Debiak package dpkg Sam1 Linux - Software 5 06-02-2002 02:17 PM


All times are GMT -5. The time now is 05:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration