Ubuntu package management – dpkg
Dpkg is package manager for ubuntu/debian. It’s same as “rpm” is for redhat. Dpkg is used to build, install, remove and provide informations about ubuntu packages. dpkg itself is a low level tool which is used only to manage packages, instead of that APT is high level tool which could fetch the packages also from the remote locations and do some complex tasks. Then there comes tools like aptitude and synaptic which are having a more user friendly interface and a lot more complex ways of dealing with package management.
This is how you could use the dpkg:
- Install a package
- Install all packages recursively from a directory
- Remove a installed package expect configuration files
- Remove a installed package with configuration files
- Unpack the package but don’t configure it
- Reconfigure an unpacked package
- Forget about uninstalled available packages
- Erase the existing information about what packages are available.
- Searches for packages that have been installed only partially on your system.
- Compare Package version numbers
- Display dpkg version information
- Display dpkg licence
- Display a brief help message
- Build a deb Package
- List contents of the package
- Show information about the package
- List packages matching given pattern
- List all installed packages with short description and package version
- Report status of package
- List files installed from the package
- List the package name from the installed file
- Display details about the package
# dpkg -i <package name.deb>
# dpkg -R <directory name>
# dpkg -r <package name-.deb>
# dpkg -P <package name-.deb>
# dpkg –unpack <package_file-.deb>
# dpkg –configure <package file-.deb>
# dpkg –forget-old-unavail
# dpkg –clear-avail
# dpkg -C
# dpkg –compare-versions <package 2> op <package 1>
# dpkg –version
# dpkg –license
# dpkg –help
# dpkg -b <directory> <package name>
# dpkg -c <filename>
# dpkg -I <filename>
# dpkg -l pattern
# dpkg -l
# dpkg -s <package name>
# dpkg -L <package name>
# dpkg -S <filename>
# dpkg -p <package name>