Description of problem: FutureFeature "dnf search" shows a list of packages as a result of the search. The list doesn't show which of the packages in the results are already installed. Version-Release number of selected component (if applicable): 1.1.5 How reproducible: Install a package with dnf and search for it Steps to Reproduce: 1.dnf install "some package" 2.dnf search "some package" Actual results: A list of search results which includes the installed package without further information if it is installed Expected results: The package should have something like [installed] after its name or description Additional info:
By design, showing this kind of status is not in the scope of the search command. To list the installed packages, please use the "dnf list installed" command instead.
(In reply to Michal Domonkos from comment #1) > By design, showing this kind of status is not in the scope of the search > command. To list the installed packages, please use the "dnf list > installed" command instead. Please reconsider this design and reopen the bug as a low-priority feature request. A full list of installed packages is not a useful substitute for the suggested "installed" indicator in a list of package search results, such as conveniently, fortunately shown by package managers like apt.
Tobias, that makes sense. I'm reopening this for the DNF folks to revisit.
Try to use "repoquery" command. It is not as "apt search", but it can help. "repoquery" allows to define format of output (--qf 'format string') and to add reason of instalation to the output. Examples: search keys only in installed packages: "dnf repoquery --installed key1 key2 ..." search keys only in installed packages and print info about reason of installation - user, dependency, ... : "dnf repoquery --installed --qf '%{reason} %{name}-%{evr}.%{arch}' key1 key2 ..." search keys in all packages and print info about reason of installation - user, dependency, ..., (none) - if package is not installed: "dnf repoquery --installed --available --qf '%{reason} %{name}-%{evr}.%{arch}' key1 key2 ..." (If a package is available in a repository and is installed too, it is printed two times - as installed, and as (none) for repository).
I think that is an important missing feature.
The point is to look for "uninstalled" things to install. The equivalent apt is: apt search xfce | grep -v installed
Hi,I've read your question. I think the purpose of "dnf search" is to search for keywords. Command: dnf list --installed dnf list --installed | grep keywords It displays the installed packages.