dpkg is the primary tool used for managing packages on debian-based Linux systems.
dpkg can be used to install, remove and configure packages. It can also be used to provide information about installed packages, such as installation state, and software version.
dpkg can only be used to install debian packages that are already on the system. It can not download debian packages from a repository.
Debian Packages
A debian package, indicated by a .deb file type, is a collection of files and scripts arranged in a particular format, to meet the debian package system. The debian package contains its own instructions on where to unpack the files and executables that it contains, allowing a user simply to install the debian package, without worrying about the correct folder locations for its contents.
Using dpkg to install a package
dpkg can be used to install debian packages on your system.
Typically, this will only be necessary if you obtain a customised package from far South Networks and need to install it on your system.
The package would then need to be moved onto the device, using scp or Winscp, and then installed using dpkg.
For example, if you were to receive a customised comma-gui package from Far South Networks, named comma-gui_1.4.131.deb
To install this package, move it to the /home/comma directory on your device and then use the dpkg command with the -i option. Adding the -i option instructs dpkg to install the selected package:
> sudo dpkg -i /home/comma/comma-gui_1.4.131.deb
This will unpack the package, placing all components in the necessary folders.
Using dpkg to determine details about installed packages
dpkg can also be used to show details about packages that are already installed.
To see a full list of installed packages try:
> sudo dpkg -l
This will list all packages on the system.
You could also request information on a particular package. For instance, if you are wanting details of the comma-gui package you could try:
> sudo dpkg -l comma-gui
This will return the status of the comma-gui package.
The status is reflected on the extreme left hand side of the output returned.
Status codes are as follows:
The first letter indicates the desired status of the package
First letter -> desired package state ("selection state"):
The second letter indicates the current status of the package:
Second letter -> current package state:
The third letter will only be present if there is an error with the package.
Third letter -> error state (you normally shouldn't see a third letter, but a space, instead):