I can search packages with apt-cache search <package_name>, or search installed packages with apt list --installed | grep <package_name>.

How about packages that are not installed? How do I search the list of non-installed package with apt-cache or apt?

2 Answers 2


You can see them like this... but not in nice colours

apt list --installed=false | grep -v '\[installed'
  • Are you sure nothing will come before installed, or the order of installed, automatic get reversed? May 14, 2017 at 15:55
  • my results are, installed always comes first and before automatic. I didn't find installed anywhere in the package list other than at the end of the lines @KongChunHo
    – Zanna
    May 14, 2017 at 16:00

I realize that this does not use apt-cache or apt, but aptitude provides some powerful ways of searching:

aptitude search '!~i ^apt*'

or equivalently,

aptitude search '?not(?installed) ^apt*'

produces an output like:

p   apt-forktracer                                                                         - utility for tracking non-official package versions
p   apt-listbugs                                                                           - tool which lists critical bugs before each APT installation
p   apt-listdifferences                                                                    - source differences notification tool
p   apt-mirror                                                                             - APT sources mirroring tool
p   apt-move                                                                               - maintain Debian packages in a package pool
p   apt-offline                                                                            - offline APT package manager
p   apt-offline-gui                                                                        - offline APT package manager - GUI
p   apt-rdepends                                                                           - recursively lists package dependencies
p   apt-show-source                                                                        - Shows source-package information
p   apt-show-versions                                                                      - lists available package versions with distribution
p   apt-src                                                                                - manage Debian source packages
p   apt-transport-https                                                                    - https download transport for APT

Note that the first letter of each line gives the state of the package; here are some common ones:

p     no trace of the package exists on system
c     package has configuration files remaining on system
v     virtual package

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .