30

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?

2 Answers 2

43

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'
0
4

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

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

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

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.