How do I install a .deb
file via the command line?
729
258
| |||||
|
806
|
Packages are manually installed via the Something along the lines of: But of course the easiest ways to install a package would be, first, the GUI apps (Synaptic, Software Center, etc..), followed by the terminal commands Since dpkg is the base, you can use it to install packaged directly from the command line. Install a package
For example if the package file is called Remove a package
For example if the package is called Reconfigure an existing package
This is useful when you need to reconfigure something related to said package. Some useful examples it the
Another great one is when you need to set the Timezone for a server or your local testing computer, so you use use the
| ||||||||||||||||
|
117
|
Debian (.deb) packages are the packages that are used in Ubuntu. You can install any .deb package in your system. .deb files can generally be installed from your file manager (Nautilus) merely by clicking on them, since file associations with the default installer is already set in Ubuntu. These instructions are for those who wish to install packages from the command-line terminal (Terminal). To install a downloaded Debian (Ubuntu) package (.deb): Open Terminal and type
To remove a Debian (Ubuntu) package (.deb):
To Reconfigure/Repair an installed Debian (Ubuntu) package (.deb):
| ||
78
|
My favourite is GDebi, available from both terminal/shell or graphical desktop.
I usually associate For command-line run | ||||||||||||
|
67
|
DPKG commands There are two actions, they are Install a package
Remove a package
Remove a package and its configuration files
List all installed packages. You can pipe the command to
Check if the package is installed or not
Check if the package is installed or not, and if it is, launch it:
See whether a package is installed or not And this will show the location where the package will be installed. Here
Install a *.deb package from a specified location Here
Show package details Here
View the content of a package Use
Extract the
|
|
"Check if the package is installed or not, and if it is, launch it: # dpkg -l | vlc " - this would only pipe a list of packages to vlc, with unpredictable results if it were installed; and no better than just typing vlc –
Xen2050
Feb 7 '15 at 6:15
|
19
|
A handy tip when installing a program like Libreoffice which has multiple .deb files in a folder is to use.
| ||
9
|
While
Note the | |||
6
|
Create your own script installer
Make the script executable with
Then move it to some dirs in your PATH or add the current directory to your PATH. I'm going to move it to /usr/bin
Now you can install any
The added value of this method is the solving the dependencies problem, since mostly you'll face some problems when you install a | |||
1
|
To install a Debian package (ends with '.deb') using cmd 'dpkg', you would enter:
If you want to remove that same Debian package at some point, then:
To get a list of current Debian packages installed, use:
| ||
0
|
To Install:
To Remove:
To Reconfigure:
Another approach is to install gdebi | |||
0
|
The
|
|
askubuntu.com/a/170557/158442 does say gdebi can be used from the command line –
muru
Dec 27 '16 at 11:59
| ||
|
@muru Yeah, but it's easy to miss because of the screenshot. Also, it doesn't explain the problems with dpkg -i skype.deb –
Flimm
Dec 27 '16 at 12:29
|
0
|
In 16.04 & higher: Apt now installs & resolves dependencies from .deb files so quite simple,
| |||
protected by Community♦ Feb 20 '14 at 20:57
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?