← Packages & Services
Linux · Packages & Services

How to find which package provides a file in Linux

Find which package owns a file or provides a command with dnf provides, rpm -qf, and dpkg -S.


Track a file or missing command back to its package. Useful when a library or binary is missing and you need to know what to install.

# Which package owns an installed file
rpm -qf /usr/bin/sqlplus     # RHEL/OL
dpkg -S /usr/bin/vim         # Debian/Ubuntu

# Which package provides a file (even if not installed)
dnf provides '*/libaio.so.1'   # RHEL/OL
apt-file search libaio.so.1    # Debian/Ubuntu (needs apt-file)
Linuxdnfprovides