Install and Manage Packages Using dpkg
In this step, you will learn how to use the dpkg command to install, remove, and manage packages on your system.
First, let's install a package using dpkg:
sudo dpkg -i example-package.deb
This command will install the package named example-package.deb. If the package has any dependencies, you will need to install them manually using apt or dpkg.
To remove a package, use the remove subcommand:
sudo dpkg -r example-package
This will remove the package from your system. If you want to remove the package and its configuration files, use the purge subcommand instead:
sudo dpkg -P example-package
You can list all the installed packages on your system using the list subcommand:
dpkg --list
This will display a list of all the packages installed on your system.
To get information about a specific package, use the info subcommand:
dpkg --info example-package
This will display detailed information about the example-package package, including its version, description, and dependencies.
Finally, you can check the status of a package using the status subcommand:
dpkg --status example-package
This will display the current status of the example-package package, such as whether it is installed, removed, or in a broken state.