The dpkg utility works at a layer lower than the APT utilities do. APT uses dpkg behind the scenes to manage software on your Ubuntu system. APT and dpkg work similar to the way yum and rpm do on Red Hat–based Linux distributions. Usually, APT will have enough functionality to get you through just about anything, but there are times when dpkg will be needed, such as finding out which package is associated with a given file on your system. Following are some of the common dpkg command options and parameters.
dpkg -c <.deb file>
dpkg -c <.deb file>
Lists files which are installed by the .deb file given (.deb file must be path/filename).
dpkg –I <.deb file>
Lists information about the .deb given file.
dpkg –p <package>
Lists information about the package.
dkpg –S <filename>
Lists the packages where the given file name is found. This can be a path, or just the name of a file.
dpkg –l
Lists installed packages. This will also take options for more specific info.
dpkg -L <package>
Lists all the files which have been installed from package (package must have been previously installed).
dpkg –s <package>
Lists the status of the given package.
sudo dpkg –i <.deb file>
Installs the given .deb file.
sudo dpkg –r <package>
Removes the given package from the system, but leaves files behind.
sudo dpkg –P <package>
Removes package and config files of given package.
sudo dpkg -x <.deb file> <directory>
Extracts the files contained in the .deb file to a destination directory. This will reset permissions on the target directory.
0 comments:
Post a Comment
speak out... itz your time !!!