How to Install Packages in Debian 11

Linux has always about choices and this can be also applied to package installation in Debian. You get multiple ways by which you can install packages in Debian and we are going to show you how you can ease each option in detail.

There are also some other package managers such as snap and flatpack but they require some work and today we are only going to focus on simple ways to install packages.

As we have mentioned earlier, there are multiple ways by which you can install packages in Debian 11. We are going to discuss 3 ways by which you can install packages in your Debian system. let’s start with well known Apt.

Installing Packages Using Apt

Apt (Advanced packaging tool) is well known as it is generally used for installation, updation, and removal of packages. Apt can be used to install packages directly where we have to specify the exact name of the package such as vlc, brave-browser, etc.

The structure of downloading software online using apt is given below:

sudo apt install {package name}

Where you have to replace the package name with your desired package. Now, let’s install Thunderbird using apt. It will look similar to the given command:

sudo apt install thunderbird

1. sudo apt install thunderbird

It will ask for your permission with the required disk space for installation. Hit Enter or type Y to process further.

You can disclude this permission part by just adding -y. That means the user will accept anything just for installing the required software and don’t need to ask for his permission anymore. The command will look something like this:

sudo apt install thunderbird -y

2. sudo apt install thunderbird -y

It will start downloading without asking for your permission as we have already agreed by adding -y at the end of the command.

You can also use apt for installing local packages. Local packages mean packages that are already been downloaded and have a .deb Extension. So let’s install Thunderbird from the already installed .deb package.

As we install software from the downloaded .deb file, we have to specify filename using ./

Use the following command to install Thunderbird from the .deb file:

sudo apt install ./thunderbird_78.14.0-1~deb11u1_amd64.deb

3. installing Thunderbird from deb file

Installing packages Using Dpkg

Dpkg is the package manager of Debian and can be also used on Ubuntu, Linux Mint, and other Ubuntu/Debian-based distros. You can be used to install and remove local packages. Follow the given command structure for installing any .deb package using dpkg

sudo dpkg -i {package name.deb}

Let’s install Thunderbird using dpkg so you can have a better idea of how you can install packages using dpkg.

sudo dpkg -i thunderbird_78.14.0-1~deb11u1_amd64.deb

4. sudo dpkg -i thunderbird_78.14.0-1~deb11u1_amd64.deb

Installing Packages Using Gdebi

Gdebi is a small command-based tool that allows users to install packages that are present locally. To install gdebi, follow the given command:

sudo apt install gdebi

5. sudo apt install gdebi

Once you download gdebi, you have to follow the given structure to install local packages:

sudo gdebi {package name.deb}

Let’s install Thunderbird using gdebi. You can replace Thunderbird with your locate package from the given command:

sudo gdebi thunderbird_78.14.0-1~deb11u1_amd64.deb

6. sudo gdebi thunderbird_78.14.0-1~deb11u1_amd64.deb

Installing Packages Using Synaptic

Synaptic is the best GUI tool that enables users to install, update and remove packages without any commands involved. Synaptic is pre-installed on Debian but somehow, you are not able to locate it, you can install it by using the given command:

sudo apt install synaptic

7. sudo apt install synaptic

Once you are done with the installation part, click on Activities situated on the top left corner and type Synaptic. Hit Enter on the first result.

8. searching synaptic from activites

Once Synaptic is launched, search for Thunderbird by clicking on the Search button.

9. searching Thunderbird in synaptic

You will find numerous results, from which find Thunderbird and right-click on it. Select mark for installation option.

10. click on mark for installation

Once you will mark it for installation, you will find Thunderbird option is marked. Now click on Apply button situated on top.

install packages in debian

You will find the number of dependencies and size of installation listed. Click on apply again.

12. click on apply for final installation

Synaptic will start downloading and installing packages.

13. downloading files

Note: If you want to install packages, you should use Apt which involves direct downloading and installing packages, or use Synaptic. There is a major reason behind that why we are advising you why you should go with those online methods rather than downloading .deb packages.

When you download .deb packages and install them, your system will assume that all the dependencies related to that package have already been installed and won’t check for any dependencies.

If you are an advanced user, who knows what are the required dependencies, you can install packages from the .deb file but if you are a beginner or even intermediate user, you will find crashes and system breakages if you have not installed dependencies properly.

Apt and Synaptic (for online installation) will check required dependencies and install them so you can use installed packages without any issues.

You might consider checking Debian’s official site for package management

Frequently asked questions related to package installation

How do I install a .deb file?

Open your file manager and locate your downloaded .deb file. Right-click on it select the “Open With Other Application” option. Select the software install option and it will open a prompt from where you just have to click on the Install button and it will start the installation process.

How do I see installed packages in Linux?

Open your Terminal and use this command: dpkg –list. It will generate a list of installed packages on your system.

How do I fix unable to locate a package?

The easiest way to solve this issue is to update your repositories. Open your Terminal and use this command to update currently installed repositories: sudo apt update

Which method do you prefer the most for package installation?

As there are multiple ways to install packages on Debian, it often confused users to choose which one they should prefer. This is the reason why we came up with a detailed guide on how to install packages on Debian so that you can choose what suits you the best.

Sagar Sharma
Sagar Sharma

Sagar always uses Linux to its core and loves to write the technical side of system administration! While he's not writing for GeniusGeeks, you can find him writing for core linux blogs like IT'SFOSS.com and LinuxHandBook.com

Articles: 56