Raspberry Pi

How to Install deb File on Raspberry Pi

Installing a package or software from the official Raspberry Pi source list is pretty simple as you only require an installation command with few dependencies. However, not all packages are included in the Raspberry Pi official repository, which makes it difficult for you to install applications that are not included in the Raspberry Pi list; instead, they are available in the form of a deb file.

If you are unsure about installing an application through the deb file, follow this article’s guidelines for a detailed explanation of the process.

How to Install deb File on Raspberry Pi

Installing a .deb file is quite simple, which only requires downloading the file from a source and installing it successfully on your Raspberry Pi device. To install software or package through the deb file, follow the below-mentioned steps:

Step 1: Update Raspberry Pi Source Packages List

Before starting the installation process, make sure that your packages on the Raspberry Pi source list are up to date and you can do so using the following command:

$ sudo apt update && sudo apt upgrade

Step 2: Download a deb File on Raspberry Pi

Next, you will need to download the deb package from a source to your Raspberry Pi device and you can download them easily through wget command using the following syntax:

$ wget <URL-of-Deb-File>

Let’s suppose we are downloading a deb file of Network Monitoring Traffic Tool (Ntop) on Raspberry Pi from its website, so we can apply the following command in the terminal to download this file:

$ wget https://packages.ntop.org/RaspberryPI/apt-ntop.deb

Step 3: Install deb Package on Raspberry Pi

Now, there are two ways to install a deb package on Raspberry Pi, either you can choose apt installer to install a deb package, or you can choose “dpkg” installer for deb package installation.

To install a deb package through “apt”, you can use the following command:

$ sudo apt install ./<deb package>

So, the command to install ntop deb package would be:

$ sudo apt install ./apt-ntop.deb

In case you want to use “dpkg” installer, you can apply the following command:

$ sudo dpkg -i apt-ntop.deb

However, the recommended approach to install a deb package is through the apt installer as it handles the dependencies well compared to dpkg, which might cause issues sometime.

Remove Deb Package from Raspberry Pi

After completing the installation of the deb package on Raspberry Pi; it’s better to remove the downloaded deb package from your device to free up space. To remove the downloaded packages, you have to apply the following command:

$ sudo rm <deb_package_name>

Conclusion

The software or package installation on Raspberry Pi from the deb file is useful when you cannot install it from the Raspberry Pi source list. To install the deb package, you first need to have a deb file of a package and you can download it easily through the wget command. Once the package is downloaded, you can use the apt or dpkg installation command to install the software or package successfully.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.