Windows dpkg -i / msiexec /i equivalent in Linux
Installs a local .deb package file you have downloaded manually, rather than from a repository.
dpkg -i / msiexec /i
sudo apt install ./package.deb
sudo dnf install ./package.rpm
sudo pacman -U ./package.pkg.tar.zst
Overview
What this command does
Installs a local .deb package file you have downloaded manually, rather than from a repository.
apt install ./file.deb (with ./) rather than dpkg -i — apt automatically resolves and installs dependencies, while dpkg does not.Practical tasks
Common use cases
Install a manually downloaded .deb package
Installs a local .deb package file you have downloaded manually, rather than from a repository.
apt install ./package.deb
Install .deb with dependency handling (preferred)
dpkg -i package.deb
Install .deb directly (no dep resolution)
apt --fix-broken install
Fix broken dependencies after dpkg install
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
wget https://example.com/app.deb
sudo apt install ./app.deb
sudo apt --fix-broken install
Walkthrough
Examples with explanations
# Windows: msiexec /i installer.msi
# Download and install:
wget https://example.com/app.deb
sudo apt install ./app.deb # handles dependencies
# Fix broken deps if you used dpkg -i:
sudo apt --fix-broken install
Reference
Common options and variations
| Command or option | Use |
|---|---|
apt install ./package.deb | Install .deb with dependency handling (preferred) |
dpkg -i package.deb | Install .deb directly (no dep resolution) |
apt --fix-broken install | Fix broken dependencies after dpkg install |
sudo dnf install ./package.rpm | Install .rpm on Fedora/RHEL |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This workflow changes mostly by Linux distribution package manager: Debian/Ubuntu uses apt, Fedora uses dnf, and Arch uses pacman.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | apt/dpkg | sudo apt install ./package.deb |
apt can install a local .deb while resolving dependencies. |
| Fedora | dnf/rpm | sudo dnf install ./package.rpm |
dnf can install a local .rpm while resolving dependencies. |
| Arch | pacman | sudo pacman -U ./package.pkg.tar.zst |
pacman -U installs a local Arch package file. |
Keep learning