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?
Asked
Active
Viewed 2.0k times
2 Answers
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'
Luten
- 103
- 5
Stéphane Chazelas
- 522,931
- 91
- 1,010
- 1,501
4
I usually do dpkg -l|fgrep …. Does it count?
UPD.: aptitude search '?narrow(?installed, …)'
(But I seem to prefer dpkg -l anyway) ;)
poige
- 6,195
- 2
- 30
- 57
-
Thank you. Is there any way to do the same with the `aptitude` command as well? – B Faley Dec 09 '13 at 13:44
-
@Meysam, see the UPD. – poige Dec 09 '13 at 13:52