Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I don't understand why if I type dpkg -l mutt, I obtain no packages found matching mutt.

However mutt is there and can be installed by sudo apt-get install mutt

As far as I know dpkg (on debian) should list every package, installed or not, giving information on the package status.

share|improve this question
add comment

2 Answers

dpkg -l will list only the packages that are installed on your machine. In your case, the package mutt is not installed. To search for packages that are installed or not, you can use aptitude search package-name-pattern.

share|improve this answer
add comment

Unlike aptitude or apt-cache with dpkg we can only list packages that are installed or were removed from our system.

To obtain information on a package that is or was not installed we may use

sudo apt-get update # to update the cache
apt-cache showpkg <packagename>

In case we only want to list a package that was not installed before we may issue

dpkg -l <packagename> || apt-cache showpkg <packagename>
share|improve this answer
    
really sure? so, why after installing exim4-base, dpkg -l exim* gives: ` –  user46912 Feb 19 '12 at 6:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.