Advanced package searches with Aptitude

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

to uninstall:

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 pros but whose name does not start with lib.

The search patterns are as follows:

~dtwitter

Find all the packages that Twitter has in its description, as we saw above.

~ntwitter

Find all packages that Twitter has in its name.

~Ptwitter
Find all packages that contain twitter in their name or that provide twitter.

~U

Look for any installed packages that can be updated.

More information: Open terminal and put: man aptitude

7 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Hugo said

    Nice. I had never tried some of these advanced variants, now thanks to you I will have a new toy to decorate .. ahem experiment with my Linux, hehehe.

  2.   rots87 said

    Too bad I do not use any derivative of debian but I use Archlinux ... at least the search for packages in arch I do it with a program called pkgbrowser I think it is only the database of the programs that are in the repos and in the AUR 0.0

  3.   Hugo said

    Another parameter for the collection: aptitude search ~ i search installed packages.

    Example:
    aptitude search ~ixorg

  4.   Nonamed said

    you are missing something necessary for cleaning the system

    aptitude purge ~ c

  5.   st0rmt4il said

    Deluxe!.

    Here is a tip also for some in case it is useful:

    http://mundillolinux.blogspot.com/2013/05/aprendiendo-usar-el-gestor-de-paquetes.html

    Regards!

  6.   Dante Mdz. said

    Very interesting, with that I can make the most of Debian.

  7.   dario said

    I'm more used to apt-cache search thing to search