25

After executing the aptitude search pattern command, I need to see only installed packages in the search result. Is there any way to do that?

37

Add ~i (short for ?installed) to match the installed packages whose name contains bash:

aptitude search '~i bash'

To match whose description contains bash.

aptitude search '~i ~d bash'

To limit to the ones that are not installed:

aptitude search '!~i bash'
4

I usually do dpkg -l|fgrep …. Does it count?

UPD.: aptitude search '?narrow(?installed, …)'

(But I seem to prefer dpkg -l anyway) ;)

  • Thank you. Is there any way to do the same with the aptitude command as well? – Meysam Dec 9 '13 at 13:44
  • @Meysam, see the UPD. – poige Dec 9 '13 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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