Linux package management tool-dpkg

Table of contents

foreword

1. What is .deb

2. Install the software package

3. Uninstall the software package

4. Query the status of the software package

5. Query the list of installed packages

6. Solve the dependency problem


foreword

dpkg is the basic package management tool for managing software packages in Linux distributions like Debian and Ubuntu

Some common commands of dpkg, through these commands, you can effectively manage software packages on your Linux system. Note that caution is required when using dpkg, as it does not automatically resolve dependencies, which may result in incomplete packages or system instability. It is generally recommended to use advanced package management tools such as apt to install, upgrade and remove packages, they will handle dependencies better.

1. What is .deb

.deb (Debian Package): .deb is the package format used in Debian and Debian-based Linux distributions such as Ubuntu. dpkg is a management tool for .deb packages.

2. Install the software package

for installing a package called VS Code.deb

sudo dpkg -i VS Code.deb

3. Uninstall the software package

Used to uninstall a package called VS Code, but keep its configuration files.

sudo dpkg -r VS Code

Used to cleanly uninstall the package named VS Code, including configuration files.

sudo dpkg -P VS Code

4. Query the status of the software package

Query whether the software package named VS Code has been installed, and display its version information.

dpkg -l VS Code

5. Query the list of installed packages

Display a list of all installed packages on the system.

dpkg -l

6. Solve the dependency problem

Used to fix broken package dependencies.

sudo apt-get install -f

 

Guess you like

Origin blog.csdn.net/m0_67906358/article/details/131889814