How to Manually Install a .deb Package on Linux
With a graphical interface or terminal, and why to use apt install instead of dpkg.
Some programs (especially proprietary software) are distributed as a loose .deb file, instead of being in the official repositories.
With a graphical interface
Double-click the downloaded .deb file — your distribution's software installer opens, with an install button.
From the terminal
sudo apt install ./filename.deb
The ./ before the name is important — it tells apt
this is a local file, not a package to search for in the online
repositories.
Using apt install (not dpkg -i) for loose
.deb files has a real advantage: apt automatically resolves any
dependencies the package needs, something dpkg alone
doesn't do.
Warning: only download .deb files from the official website of the program in question — unlike your distribution's official repositories, a loose .deb doesn't go through any additional verification before reaching you.
Frequently asked questions
Why use 'apt install ./file.deb' instead of 'dpkg -i'?
apt automatically resolves any dependencies the package needs, while dpkg alone doesn't, which can leave the package installed but not functional without those dependencies.
Is it safe to install any .deb I find?
Only if it comes from the program's official website — unlike your distribution's repositories, a loose .deb doesn't go through any additional verification before reaching you.