dpkg -i: Install a Local .deb Package
dpkg -i installs a local .deb file without consulting a repository, which is how you add a downloaded package in CI.
When a vendor ships a .deb (Chrome, a CLI, a runner agent), dpkg -i installs it. Because dpkg does not fetch dependencies, you follow with apt-get -f install.
What it does
dpkg -i unpacks and configures a .deb file already on disk. It does not download or resolve dependencies from a repository, so if the package needs libraries that are missing, the install is left half-configured until you fix the dependencies.
Common usage
curl -fsSL -o pkg.deb https://example.com/pkg_1.2.3_amd64.deb
dpkg -i pkg.deb || apt-get install -y -f
# newer alternative that resolves deps itself
apt-get install -y ./pkg.debOptions
| Flag | What it does |
|---|---|
| -i <file.deb> | Install (unpack and configure) the package |
| -r <pkg> | Remove an installed package (keep config) |
| -P <pkg> | Purge a package including its config |
| --force-confnew / --force-confold | Choose new or old config on conflict |
| --no-triggers | Skip processing triggers (advanced) |
In CI
Chain dpkg -i pkg.deb || apt-get install -y -f so missing dependencies are pulled in automatically. On modern apt you can skip dpkg entirely and run apt-get install -y ./pkg.deb, which resolves dependencies in one step. Run apt-get update first so -f can find the deps.
Common errors in CI
"dependency problems prevent configuration of <pkg>" followed by "Errors were encountered while processing" means dependencies are missing; run apt-get install -y -f to resolve them. "dpkg: error processing archive ... cannot access archive: No such file or directory" means the .deb path is wrong. "package architecture (amd64) does not match system (arm64)" means the wrong arch was downloaded.