Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Difference between `apt search` and `apt list`?

I thought apt list was for installed packages, but looks like it needs the --installed flag for that. So what is the difference between it and apt search. Is the former only looking in a local cache of available packages?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

This is where the manual is useful:

apt search {criteria}

    search can be used to search for the given regex(7) term(s) in the list of available
    packages and display matches. This can e.g. be useful if you are looking for packages
    having a specific feature. If you are looking for a package including a specific file
    try apt-file.
apt list {criteria}

   list is somewhat similar to dpkg-query --list in that it can display a list of
   packages satisfying certain criteria. It supports glob(7) patterns for matching
   package names as well as options to list installed (--installed), upgradeable
   (--upgradeable) or all available (--all-versions) versions.

In plain English, with apt search {criteria} you can find packages that meet the criteria you set in their names, descriptions, or other metadata.

apt list {criteria}, however, gives you the option to list packages based on their names and whether they are already installed, currently upgradable, or simply exist (in your local copy of the package list cache).

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading