How to use dpkg in Ubuntu?
dpkg is a package management tool in the Debian Linux system used for installing, uninstalling, and managing software packages. Here are some common commands and usages for dpkg.
- Install software package:
sudo dpkg -i package.deb
The package.deb is the file name of the software package to be installed using the -i parameter.
- Uninstall software package:
sudo dpkg -r package_name
Use the “-r” parameter to uninstall the package, where package_name is the name of the software package.
- View information about installed software packages:
dpkg -l
This command will list information on all installed packages in the system.
- Check the status of the software package:
dpkg -s package_name
Use the -s parameter to check the installation status of the package, where package_name is the name of the software package.
- View detailed information about the software package:
dpkg -I package.deb
Use the -I parameter to view detailed information about the software package, where package.deb is the file name of the package.
- Reconfigure software packages.
sudo dpkg-reconfigure package_name
Use the dpkg-reconfigure command to reconfigure a package, where package_name is the name of the software package.
- Check software package dependencies.
dpkg -l package_name
Check the dependencies of a package using the -l parameter, where package_name is the name of the software package.
It is important to note that dpkg is a low-level package management tool and does not handle dependencies between software packages. If you need to manage package dependencies, it is recommended to use higher-level package management tools such as apt or apt-get.