- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
3 Command Line Tools to Install Local Debian (.DEB) Packages
Debian is one of most popular Linux distributions among users, and it uses ".deb" package format to install software packages. These packages contain all necessary files and instructions for installing software on your system. While there are several ways to install Debian packages, using command line is most efficient way. In this article, we will discuss three command-line tools that can be used to install local Debian packages.
APT (Advanced Package Tool)
APT is default package manager in Debian, and it can be used to install packages from repositories or local packages. To install a local Debian package using APT, follow these steps −
Step 1 − Open a terminal and navigate to directory where ".deb" package is saved using "cd" command.
Step 2 − Run following command to install package −
sudo apt install ./packagename.deb
Note − Replace "packagename.deb" with actual name of package.
Step 3 − APT will prompt you to enter your password. Enter your password and press "Enter."
Step 4 − APT will download and install package along with any dependencies required by package.
Example
Let's say you have downloaded Google Chrome ".deb" package and saved it in Downloads directory. To install package, follow these steps −
Step 1 − Open a terminal and navigate to Downloads directory using following command −
cd ~/Downloads
Step 2 − Run following command to install package −
sudo apt install ./google-chrome-stable_current_amd64.deb
Step 3 − APT will prompt you to enter your password. Enter your password and press "Enter."
Step 4 − APT will download and install package along with any dependencies required by package.
DPKG (Debian Package)
DPKG is a command-line tool that is used to install, remove, and manage Debian packages. To install a local Debian package using DPKG, follow these steps −
Step 1 − Open a terminal and navigate to directory where ".deb" package is saved using "cd" command.
Step 2 − Run following command to install package −
sudo dpkg -i packagename.deb
Note − Replace "packagename.deb" with actual name of package.
Step 3 − DPKG will prompt you to enter your password. Enter your password and press "Enter."
Step 4 − DPKG will install package along with any dependencies required by package.
Example
Let's say you have downloaded VLC media player ".deb" package and saved it in Downloads directory. To install package, follow these steps −
Step 1 − Open a terminal and navigate to Downloads directory using following command −
cd ~/Downloads
Step 2 − Run following command to install package −
sudo dpkg -i vlc.deb
Note − Replace "vlc.deb" with actual name of package.
Step 3 − DPKG will prompt you to enter your password. Enter your password and press "Enter."
Step 4 − DPKG will install package along with any dependencies required by package.
GDEBI (GNOME Debian Package Installer)
GDEBI is a graphical user interface (GUI) tool that can be used to install Debian packages. It provides a user-friendly interface for installing packages and resolving dependencies. To install GDEBI, run following command −
sudo apt install gdebi-core
Once GDEBI is installed, you can use it to install local Debian packages by following these steps −
Step 1 − Right-click on ".deb" package and select "Open With GDebi Package Installer."
Step 2 − GDEBI will open and display information about package, such as package name, version, and dependencies.
Step 3 − Click on "Install Package" button to install package.
Step 4 − GDEBI will prompt you to enter your password. Enter your password and click on "Authenticate."
Step 5 − GDEBI will download and install package along with any dependencies required by package.
Example
Let's say you have downloaded Dropbox ".deb" package and saved it in Downloads directory. To install package using GDEBI, follow these steps −
Step 1 − Right-click on "dropbox.deb" package and select "Open With GDebi Package Installer."
Step 2 − GDEBI will display information about package, such as package name, version, and dependencies.
Step 3 − Click on "Install Package" button to install package.
Step 4 − GDEBI will prompt you to enter your password. Enter your password and click on "Authenticate."
Step 5 − GDEBI will download and install package along with any dependencies required by package.
In addition to installing local Debian packages, these tools can also be used to uninstall packages or check status of installed packages. Let's take a look at how you can perform these tasks using each of tools discussed.
Uninstalling Packages
To uninstall a package using APT, run following command −
sudo apt remove packagename
To uninstall a package using DPKG, run following command −
sudo dpkg -r packagename
To uninstall a package using GDEBI, open GDEBI package installer, select package you want to uninstall, and click on "Remove Package" button.
Checking Package Status
To check status of a package using APT, run following command −
sudo apt list packagename
To check status of a package using DPKG, run following command −
sudo dpkg -s packagename
To check status of a package using GDEBI, open GDEBI package installer, select package you want to check, and click on "Properties" button.
Conclusion
In this article, we discussed three command-line tools that can be used to install local Debian packages: APT, DPKG, and GDEBI. These tools provide an efficient way to install packages on your Debian-based system. APT is default package manager in Debian and can be used to install packages from repositories or local packages. DPKG is a command-line tool that can be used to install, remove, and manage Debian packages. GDEBI is a GUI tool that provides a user-friendly interface for installing packages and resolving dependencies. By using these tools, you can easily install local Debian packages on your system.