How do you install deb files or packages ob Ubuntu?
A deb package (.deb file) is a software package in a specific format designed for Debian-based distributions recognized by its .deb extension.
In this article, learn three ways to install a deb file on Ubuntu and how to remove the installed software.
Prerequisites
- Ubuntu 18.04 Bionic Beaver
- Access to terminal window/command line
- User with root/sudo privileges
Install deb Files Using Ubuntu GUI Default Software Center
If you want to avoid using the command line, installing a deb package via Ubuntu’s Software Center would be the easiest route.
1. Once you have finished downloading a deb package, click on the Files icon on your desktop and navigate to the Downloads folder. By default, this is where the system stores downloaded files.
2. Locate the file you want to install and double-click on it. A new dialogue box opens with details about the software. Click on the Install button to proceed.
3. As authentication is required to install untrusted software, you need to provide the password for your user and click on Authenticate to confirm.
That’s it! You have successfully installed a deb package on Ubuntu.
Install deb Files from the Command Line
Install deb Files Using the dpkg Command
Another way to install deb packages is with dpkg, a package manager software used for installing, removing, and building packages.
The difference between dpkg and the apt package manager is that the first does not automatically resolve dependencies required by a package. If a package relies on dependencies that are not on the system, dpkg returns an error. This means you’ll need to download them manually.
To install a deb package using dpkg run the command:
sudo dpkg -i [package_path]
Install deb Files Using the GDebi Package Installer
GDebi is a simple tool for installing local deb packages. Apart from installing the specified file, it also identifies all the required dependencies and automatically downloads and installs them using apt.
You can use GDebi via the command-line or the Ubuntu GUI. First, download the tool as it as it is not available on Ubuntu by default:
sudo apt install gdebi -y
Now you can use GDebi for installing deb packages.
To install a deb package in the command line, run the following:
sudo gdebi [package_path]
Confirm with y and press Enter.
For instance:
sudo gdebi ./Downloads/vagrant_2.2.2_x86_64.deb
GUI mode
If you want to use GUI GDebi, follow these steps:
1. Open the file manager, and locate the package. In most cases, you can find it in Downloads.
2. Right-click on the deb file and choose Open With Other Application.
3. Doing so opens a new dialogue box with a list of Recommended Applications. Mark the GDebi Package Installer and click on Select.
4. The installer loads the deb package and shows the software description (if available) and whether all the dependencies are satisfied. Click on Install Package, type in the password, and click Authenticate to start the installation.
How to remove deb packages
Uninstall a .deb File via Software Center
If you have installed a package through the software center, you can remove it by opening a terminal window and running the command:
sudo apt remove [software_name]
Removing Software with dpkg
When removing packages installed with dpkg, use its official name (not the .deb file name) in the following command:
sudo dpkg -r [software_name]
Removing Software via Gdebi
To uninstall software with Gdebi, open its Package Installer and click on Remove Package.
Conclusion
You now know (3) ways to install local software packages (.DEB) on Ubuntu. Remember, the first option works only if you are using a GUI.
原创文章,作者:3628473679,如若转载,请注明出处:https://blog.ytso.com/223063.html