Search for a specific package with dnf on Fedora 22.

To find a specific package that offers a certain file, the whatprovides parameter to dnf will do what you wish.

Here is an example, I am looking for all packages that provide the vim command.

[jason@hackerbox Documents]$ dnf whatprovides "*/vim"
Last metadata expiration check performed 26 days, 19:55:19 ago on Tue Sep 15 12:49:19 2015.
vim-enhanced-2:7.4.827-1.fc22.x86_64 : A version of the VIM editor which includes recent enhancements
Repo        : @System
 
vim-enhanced-2:7.4.640-4.fc22.x86_64 : A version of the VIM editor which includes recent enhancements
Repo        : fedora
 
vim-enhanced-2:7.4.827-1.fc22.x86_64 : A version of the VIM editor which includes recent enhancements
Repo        : updates

The xmms music player is still available for the Fedora distribution.

[jason@hackerbox Documents]$ dnf whatprovides "*/xmms"
Last metadata expiration check performed 26 days, 20:03:16 ago on Tue Sep 15 12:49:19 2015.
bash-completion-1:2.1-7.20150513git1950590.fc22.noarch : Programmable completion for Bash
Repo        : @System
 
xmms-1:1.2.11-22.20071117cvs.fc22.x86_64 : The X MultiMedia System, a media player
Repo        : @System

This is a good way to find what package is required when you wish to install a certain file to your system. Makes installing software much easier on Fedora distros.

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

Leave a Reply