Learn to install and verify RPM packages from local files, handle dependencies, and choose the right tool for the job. 16.11.2025 | reading time: 3 min Want to install an RPM you downloaded or copied to a server without relying on a repository? This short guide shows how to install a local .rpm file, check it, and handle dependencies using the classic `rpm` tool and higher-level package managers. Hands-on example: simple install Copy or move the file to the target system and run a local install; first show the package info, then install with `rpm` and with `dnf` to resolve dependencies: ``` $ ls -l mypackage-1.2.3-1.x86_64.rpm -rw-r--r-- 1 root root 123456 Nov 12 12:00 mypackage-1.2.3-1.x86_64.rpm $ rpm -qip mypackage-1.2.3-1.x86_64.rpm Name : mypackage Version : 1.2.3 Release : 1 Architecture: x86_64 Summary : Example package $ sudo rpm -Uvh mypackage-1.2.3-1.x86_64.rpm Preparing... ########################################### [100%] 1:mypackage-1.2.3-1.x86_64 # If dependencies are missing, use dnf to pull them from repos (if available): $ sudo dnf install ./mypackage-1.2.3-1.x86_64.rpm ``` This sequence shows `rpm` installing a file without dependency resolution and `dnf` handling dependencies when repositories are accessible. Key techniques and verification Always check the package before installing with `rpm -qip` and verify signatures with `rpm --checksig` or `rpm -Kv`; use `rpm -Uvh` for upgrades or first-time installs and `rpm -ivh` to force a separate install; to remove use `rpm -e`; prefer `dnf install ./file.rpm` or `yum localinstall file.rpm` when repositories or local caches can satisfy dependencies. When to use which approach Use `rpm` for quick, repository-free installs or scripted deployments where dependency handling is managed separately; use `dnf` or `yum` when you want automatic dependency resolution and access to enabled repositories; for truly offline systems, build a local repository with `createrepo` and configure it so DNF/YUM can resolve dependencies locally. Safety and best practices Check package origin and GPG signature before installing, prefer signed packages, test in a container or VM if unsure, avoid using `--nodeps` or `--force` except as a last resort, and keep a record of installed package versions with `rpm -qa | grep mypackage` for later auditing. Wrap-up and next steps Installing local RPMs is a core skill for system setup and recovery; practice the commands, learn to inspect packages and build local repos, and combine these skills with certification goals to deepen mastery: consider pursuing CompTIA Linux+ or LPIC-1 and use bitsandbytes.academy for intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. setup utilities troubleshooting