Searching for packages on an Ubuntu system with the aptitude command.

Posted: June 12, 2015. At: 11:59 AM. This was 2 years ago. Post ID: 8233

The aptitude command for Ubuntu may be used to search for packages. This makes it easy to find the appropriate package you are searching for. In this example, I am searching for the openvpn packages.

ubuntu ~ $ sudo aptitude search openvpn
p   gadmin-openvpn-client                                                       - GTK+ configuration tool for openvpn (client)
p   gadmin-openvpn-client-dbg                                                   - GTK+ configuration tool for openvpn (debug for client)
p   gadmin-openvpn-server                                                       - GTK+ configuration tool for openvpn (server)
p   gadmin-openvpn-server-dbg                                                   - GTK+ configuration tool for openvpn (debug for server)
p   network-manager-openvpn                                                     - network management framework (OpenVPN plugin core)
p   network-manager-openvpn-gnome                                               - network management framework (OpenVPN plugin GNOME GUI)
i   openvpn                                                                     - virtual private network daemon
p   openvpn-auth-ldap                                                           - OpenVPN LDAP authentication module
p   openvpn-auth-radius                                                         - OpenVPN RADIUS authentication module
p   openvpn-auth-radius-dbg                                                     - debugging symbols for openvpn-plugin-radius
p   openvpn-blacklist                                                           - list of blacklisted OpenVPN RSA shared keys
p   zentyal-openvpn                                                             - Zentyal - VPN Service

This aptitude command will list all packages that will install the vim editor.

ubuntu ~ $ sudo aptitude search '?provides (vim)'
p   vim-athena                                                                  - Vi IMproved - enhanced vi editor - with Athena GUI
p   vim-gnome                                                                   - Vi IMproved - enhanced vi editor - with GNOME2 GUI
p   vim-gtk                                                                     - Vi IMproved - enhanced vi editor - with GTK2 GUI
p   vim-nox                                                                     - Vi IMproved - enhanced vi editor - with scripting languages support
p   vim-vimerl                                                                  - Erlang plugin for Vim
p   vim-vimerl-syntax                                                           - Erlang syntax for Vim

This command will list all packages that were automatically installed.

ubuntu ~ $ sudo aptitude search '?automatic'

This is how to search for packages with a certain name.

ubuntu ~ $ sudo aptitude search '?name (emacs)'
p   acl2-emacs                                                                  - Computational Logic for Applicative Common Lisp: emacs interface
p   cxref-emacs                                                                 - Generates LaTeX and HTML documentation for C programs
i   emacs                                                                       - GNU Emacs editor (metapackage)
p   emacs-calfw                                                                 - calendar framework for Emacs
p   emacs-calfw-howm                                                            - calendar framework for Emacs (howm add-on)
p   emacs-chess                                                                 - a client and library for playing Chess from Emacs
p   emacs-goodies-el                                                            - Miscellaneous add-ons for Emacs
v   emacs-goodies-extra-el                                                      -
p   emacs-intl-fonts                                                            - Fonts to allow multi-lingual PostScript printing from Emacs
p   emacs-jabber                                                                - Jabber client for Emacsen
p   emacs-mozc                                                                  - Mozc for Emacs
p   emacs-mozc-bin                                                              - Helper module for emacs-mozc
p   emacs-window-layout                                                         - window layout manager for emacs
p   emacs23                                                                     - The GNU Emacs editor (with GTK+ user interface)
p   emacs23-bin-common                                                          - The GNU Emacs editor's shared, architecture dependent files
p   emacs23-common                                                              - The GNU Emacs editor's shared, architecture independent infrastructure
p   emacs23-common-non-dfsg                                                     - GNU Emacs shared, architecture independent, non-DFSG items
p   emacs23-el                                                                  - GNU Emacs LISP (.el) files
v   emacs23-gtk                                                                 -
p   emacs23-lucid                                                               - The GNU Emacs editor
p   emacs23-nox                                                                 - The GNU Emacs editor (without X support)
i A emacs24                                                                     - GNU Emacs editor (with GTK+ user interface)
i A emacs24-bin-common                                                          - GNU Emacs editor's shared, architecture dependent files
i A emacs24-common                                                              - GNU Emacs editor's shared, architecture independent infrastructure
i A emacs24-common-non-dfsg                                                     - GNU Emacs common non-DFSG items, including the core documentation
p   emacs24-dbg                                                                 - Debugging symbols for emacs24
p   emacs24-el                                                                  - GNU Emacs LISP (.el) files
p   emacs24-lucid                                                               - GNU Emacs editor
p   emacs24-lucid-dbg                                                           - Debugging symbols for emacs24-lucid
p   emacs24-nox                                                                 - GNU Emacs editor (without X support)
p   emacs24-nox-dbg                                                             - Debugging symbols for emacs24-nox
v   emacsen                                                                     -
i A emacsen-common                                                              - Common facilities for all emacsen
p   emacspeak                                                                   - speech output interface to Emacs
p   emacspeak-espeak-server                                                     - espeak syntesis server for emacspeak
p   emacspeak-ss                                                                - Emacspeak speech servers for several synthesizers
p   maxima-emacs                                                                - Computer algebra system -- emacs interface
p   notmuch-emacs                                                               - thread-based email index, search and tagging (emacs interface)
p   python-ropemacs                                                             - Emacs mode for Python refactoring
p   supercollider-emacs                                                         - SuperCollider mode for Emacs
p   xemacs21                                                                    - highly customizable text editor
p   xemacs21-basesupport                                                        - Editor and kitchen sink -- compiled elisp support files
p   xemacs21-basesupport-el                                                     - Editor and kitchen sink -- source elisp support files
p   xemacs21-bin                                                                - highly customizable text editor -- support binaries
p   xemacs21-gnome-mule                                                         - highly customizable text editor -- transitional package
p   xemacs21-gnome-mule-canna-wnn                                               - highly customizable text editor -- transitional package
p   xemacs21-gnome-nomule                                                       - highly customizable text editor -- transitional package
p   xemacs21-mule                                                               - highly customizable text editor -- Mule binary
p   xemacs21-mule-canna-wnn                                                     - highly customizable text editor -- Mule binary compiled with Canna and Wnn
p   xemacs21-mulesupport                                                        - Editor and kitchen sink -- Mule elisp support files
p   xemacs21-mulesupport-el                                                     - Editor and kitchen sink -- source elisp support files
p   xemacs21-nomule                                                             - highly customizable text editor -- Non-mule binary
p   xemacs21-support                                                            - highly customizable text editor -- architecture independent support files
p   xemacs21-supportel                                                          - highly customizable text editor -- non-required library files

Finally, this command will list all/any packages that are not required by any other package.

ubuntu ~ $ sudo aptitude search '?garbage'

No comments have been made. Use this form to start the conversation :)

Leave a Reply