How to Install a .d...
 
Notifications
Clear all

How to Install a .deb File on Ubuntu


(@scriptguru)
Byte Beginner
Joined: 9 months ago
Posts: 24
Topic starter  

1. Using the Ubuntu Software Center (GUI)

The easiest way for beginners!

  1. Download your .deb file from a trusted source.
  2. Double-click on the downloaded file. This will open it with the default package installer, usually the Ubuntu Software Center.
  3. Click Install and enter your password if prompted.

That’s it! The Software Center will handle the dependencies for you if possible.

2. Using dpkg in the Terminal

If you’re comfortable with the terminal, dpkg is your go-to.

  1. Open a terminal by pressing Ctrl + Alt + T.
  2. Navigate to the directory where your .deb file is. For example:
    cd ~/Downloads
  3. Run the following command to install the .deb file:
    sudo dpkg -i package_name.deb

Replace package_name.deb with the actual file name.

  1. If there are missing dependencies, you might see errors. You can resolve them by running:
    sudo apt --fix-broken install

3. Using apt for Dependency Management

apt can install .deb files while automatically handling dependencies, which is very convenient.

  1. In the terminal, run:
    sudo apt install ./package_name.deb

Make sure to include ./ before the file name or give the full path. apt will fetch any necessary dependencies from the repository, saving you extra steps.

4. Using gdebi (If You Install .deb Files Frequently)

gdebi is a dedicated tool for .deb files and does a great job of managing dependencies. It’s especially useful if you plan to install .deb files often.

  1. First, install gdebi by running:
    sudo apt update sudo apt install gdebi
  2. Now, use gdebi to install your .deb file:
    sudo gdebi package_name.deb

gdebi checks and installs any dependencies before installing the main package, reducing the chances of errors.

Tips for Managing Installed .deb Packages

  • To Uninstall a Package: Run sudo apt remove package_name where package_name is the actual name of the software (not the file).
  • Check for Dependencies Before Installing: Use apt or gdebi to manage dependencies easily.
  • Always Download from Trusted Sources: This is crucial for system security.

   
Quote
Share: