How to install a .deb package / file in Linux Ubuntu. You can manually install .deb packages via the command line. The dpkg command (Debian Package Management System) is used to installed .deb Packages.
dpkg command (Debian Package Management System)
The dpkg command is a package manager from shell for Debian and Ubuntu Linux systems. The dpkg command can be used to install, build, remove and manage .deb packages.
The syntax of the dpkg command is as follows:
dpkg -i package-name.deb
dpkg –install package-name.deb
Where -i or –install is the command argument to install the .deb package.
The dpkg command can also be used to install packaged from a sub-directory
dpkg -i -R /DIR_PATH
dpkg -i –recursive /DIR_PATH
Where -R or –recursive is used to recursively install all *.deb files found at specified directories and all of its sub-directories. /DIR-PATH must is the path to a directory where .deb files are located.
Install .deb Package
To install a .deb package you need to run the dpkg command using the sudo privilege. For example if you want to install a .deb package file named DEB_PACKAGE_NAME.deb then you should run the following command:
sudo dpkg -i DEB_PACKAGE_NAME
If dpkg command reports an error due to dependency problems, you must download the missing dependencies and configure it. You can run sudo apt-get install -f to download the missing dependencies.
Remove .deb Package
To remove a deb package, simply run the command:
sudo dpkg -r DEB_PACKAGE_NAME