Aptitude is a tool that helps us to Install / Delete / Purge / Search programs that we have installed in Debian and derivatives. Its use is very simple, take for example MC:
To install we type the following:
sudo aptitude install mc
sudo aptitude remove mc
to display information about a program:
sudo aptitude show mc
and to search:
sudo aptitude search mc
So far so good, but there is a more advanced way to search with Aptitude.
aptitude search '~N' edit
It would list all the "new" packages and all those packages whose name contains "edit"
aptitude search ~dtwitter
It would look for which package contains the word Twitter in its description.
aptitude search ^libre
It would search for all packages that start with the word free
aptitude search libre$
It would search for all packages that end with the word free
aptitude search '~dpro !~n^lib'
List all those packages whose description contains the word pro but whose name does not start with lib.
The search patterns are as follows:
Find all the packages that Twitter has in its description, as we saw above.
Find all packages that Twitter has in its name.
Find all packages that contain twitter in their name or that provide twitter.
Look for any installed packages that can be updated.