Linux server administration/dpkg

dpkg is a package management software used among others by Debian operating system. It can be used to install, remove, and provide information about .deb packages.

New package configurations will append a *.dpkg-old OR *.dpkg-dist.

Basic dpkg commands

 * Install a .deb package:
 * Remove an installed package:
 * Remove an installed package:


 * Get Information about a package
 * (-s status). See also:


 * List of installed packages in your computer can be obtained with:
 * List files in a package:
 * List files in a package:


 * Find package owner of a file:
 * (-S Search)


 * List content of a package, content can be extracted suing  command:


 * Get a list of recently installed packages


 * Get a list of recently upgraded packages


 * Get a list of recently installed or upgraded packages



Example Outputs of dpkg commands
Package: sysstat Status: install ok installed Priority: optional Section: admin Installed-Size: 1336 Maintainer: Robert Luberda  Architecture: amd64 Version: 11.4.3-2 Depends: lsb-base (>= 3.0-6), ucf (>= 2.003), xz-utils, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.14), libsensors4 (>= 1:3.0.0) Recommends: cron | cron-daemon Suggests: isag Conffiles: /etc/cron.d/sysstat 455c3c071b6daabb4e4490828975034c /etc/cron.daily/sysstat 19b1317e195208eed1a0bcd68be2e637 /etc/init.d/sysstat 577050178b0105b10118acfe3335de3f /etc/sysstat/sysstat ca4bb64ec3044408fed750d0d3d7769a /etc/sysstat/sysstat.ioconf fa92b01baa2130e26822c30fb27ac56e Description: system performance tools for Linux The sysstat package contains the following system performance tools: - sar: collects and reports system activity information; - iostat: reports CPU utilization and disk I/O statistics; - tapestat: reports statistics for tapes connected to the system; - mpstat: reports global and per-processor statistics; - pidstat: reports statistics for Linux tasks (processes); - sadf: displays data collected by sar in various formats; - cifsiostat: reports I/O statistics for CIFS filesystems. . The statistics reported by sar deal with I/O transfer rates, paging activity, process-related activities, interrupts, network activity, memory and swap space utilization, CPU utilization, kernel activities and TTY statistics, among others. Both UP and SMP machines are fully supported. Homepage: http://pagesperso-orange.fr/sebastien.godard/

Basic

 * 1) Read apt and   page
 * 2) Install a package using dkpg
 * 3) Understand differences between apt and dpkg

Advanced

 * 1) Read  https://manpages.debian.org/buster/devscripts/uscan.1.en.html and https://wiki.debian.org/debian/watch to understand how new packages are generated: https://manpages.debian.org/buster/devscripts/uscan.1.en.html