A .deb file is a Debian package — the format used by Ubuntu, Debian, Linux Mint, and any other Debian-based distribution. There are two ways to install one from the terminal.

The recommended way: apt

sudo apt install ./package.deb

The ./ prefix tells apt to treat it as a local file rather than a package name from the repositories. The main advantage over dpkg is that apt resolves dependencies automatically — if the package requires other packages that are not yet installed, apt will fetch and install them for you.

The traditional way: dpkg

sudo dpkg -i package.deb

dpkg installs the package but does not resolve dependencies. If the package depends on something that is not installed, dpkg will report errors and leave the package in a broken state. Fix it by running:

sudo apt install -f

That tells apt to find and install whatever is missing to satisfy the broken dependencies.

Verify the installation

Once installed, confirm the package is in place:

dpkg -s package-name

Or list it among installed packages:

dpkg -l | grep package-name

Remove the package

sudo apt remove package-name

Use purge instead of remove if you also want to delete configuration files:

sudo apt purge package-name