Linux-Basics-Complete-Course-With-Notes-Slides

DPKG and APT Package Managers

In this section, we will look at debian package managers for distributions like Ubuntu, Debian and PureOS.

DPKG Utility

dpkg

Working with DPKG

Similar to RPM, DPKG can be used for the below. The package extension is .deb.

  1. Installing
  2. Uninstalling
  3. Upgrade
  4. List
  5. Status
  6. Verfiying

    dpkg-modes

APT and APT-GET

Similar to RPM, DPKG doesnt resolve the dependencies when it comes to package management.

Let us know see some common commands

To refresh a repository. Run apt update command.

$ sudo apt update

To install available upgrades of all packages currently installed on the system from the sources configured.

$ sudo apt upgrade

Another way to update the repository is to use apt edit-sources command. This opens up the /etc/apt/sources.list file in the text editor of your choice.

$ sudo apt edit-sources

To install the package

$ sudo apt install telnet

To remove the package

$ sudo apt remove telnet

To search or look for a package in the repository.

$ sudo apt search telnet 

To list all the available packages

$ sudo apt list |grep telnet