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 :
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).