Aptitude – How to Show Only Installed Packages by Executing ‘aptitude search’

aptitudesearch

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?

Best Answer

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'
Related Question