Question about Computers & Internet
A package manager is a program that installs and uninstalls software, and
keeps track of all the components each piece of software needs.
Dpkg is the Ubuntu package manager dpkg is a medium-level tool to install, build, remove and manage Ubuntu packages. The primary and more user-friendly front-end for dpkg is dselect.dpkg itself is controlled entirely via command line parameters,which consist of exactly one action and zero or more options. The action-parameter tells dpkg what to do and options control the behavior of the action in some way.
Now we will see all the available commands for dpkg with examples
1) Install a package
dpkg -i <.deb file name>
dpkg -i avg71flm_r28-1_i386.deb
2) Install all packages recursively from a directory
dpkg -R /usr/local/src
3) Unpack the package, but don’t configure it.
dpkg --unpack package_file
If you use -R option is specified, package_file must refer to a directory instead.
dpkg --unpack avg71flm_r28-1_i386.deb
4) Reconfigure an unpacked package
dpkg --configure package
If -a is given instead of package, all unpacked but uncon-figured packages are configured.
dpkg --configure avg71flm_r28-1_i386.deb
5) Remove an installed package except configuration files
dpkg -r avg71flm_r28-1_i386.deb
6) Remove an installed package including configuration files
If you use -a is given instead of a package name, then all packages unpacked, but marked to be removed or purged in file /var/lib/dpkg/status, are removed or purged, respectively.
dpkg -P avg71flm
7) Replace available packages info
dpkg --update-avail <Packages-file>
With this option old information is replaced with the information in the Packages-file.
Merge with info from file
dpkg --merge-avail <Packages-file>
With this option old informa-tion is combined with information from Packages-file.
The Packages-file distributed with Debian is simply named Packages.dpkg keeps its record of available packages in /var/lib/dpkg/available.
9) Update dpkg and dselect’s idea of which packages are available with information from the package pack-age_file.
dpkg -A package_file
10) Forget about uninstalled unavailable packages.
11) Erase the existing information about what packages are available.
12) Searches for packages that have been installed only partially on your system.
13) Compare Package versions version numbers
dpkg --compare-versions ver1 op ver2
14) Display a brief help message.
15) Display dpkg licence.
dpkg --licence (or) dpkg --license
16) Display dpkg version information.
17) Build a deb package.
dpkg -b directory [filename]
18) List contents of a deb package.
dpkg -c filename
19) Show information about a package.
dpkg -I filename [control-file]
20) List packages matching given pattern.
dpkg -l package-name-pattern
dpkg -l vim
21) List all installed packages, along with package version and short description
22) Report status of specified package.
dpkg -s package-name
dpkg -s ssh
23) List files installed to your system from package.
dpkg -L package-Name
dpkg -L nagios2
24) Search for a filename from installed packages.
dpkg -S filename-search-pattern
dpkg -S /sbin/ifconfig
25) Display details about package
dpkg -p package-name
dpkg -p nagios2
Please check if this is any help for you.
Posted on Jun 04, 2010
a 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of.(from cars to computers, handyman, and even drones)
click here to download the app (for users in the US for now) and get all the help you need.
Posted on Jan 02, 2017
Tips for a great answer:
Dec 14, 2012 | Canonical Ltd. Ubuntu
on Jan 14, 2010 | Computers & Internet
on Jan 13, 2010 | Computers & Internet
Dec 06, 2012 | Canonical Ltd. Ubuntu
Feb 20, 2010 | HP Computers & Internet
Nov 23, 2009 | ASUS Eee Netbook
Mar 26, 2009 | Canonical Ltd. Ubuntu
Feb 02, 2009 | LaCie d2 DVD-RW Burner
Sep 09, 2008 | Canonical Ltd. Ubuntu
124 people viewed this question
Usually answered in minutes!