dpkg

In [11]:
whatis dpkg
dpkg (1)             - package manager for Debian
Dpkg (3)             - module with core variables
In [12]:
dpkg -S `which ls`
coreutils: /bin/ls
In [13]:
which ls
/bin/ls
In [14]:
dpkg -S /bin/ls
coreutils: /bin/ls
In [ ]:
dpkg -s coreutils
In [39]:
apt-cache show coreutils | head -10
Package: coreutils
Essential: yes
Priority: required
Section: utils
Installed-Size: 6264
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Michael Stone <mstone@debian.org>
Architecture: amd64
Version: 8.25-2ubuntu2
Replaces: mktemp, realpath, timeout
E: Write error - write (32: Broken pipe)
In [21]:
# List packages by name
dpkg -l coreutils
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  coreutils      8.25-2ubuntu amd64        GNU core utilities
In [36]:
# List packages files
dpkg -L coreutils | grep -i "^/bin/ls" -A3
/bin/ls
/bin/vdir
/bin/dir
/bin/chmod
In [3]:
dpkg -l | wc -l
1642
In [7]:
dpkg -l > pkglist.test
In [8]:
head pkglist.test
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                  Version                                    Architecture Description
+++-=====================================-==========================================-============-===============================================================================
ii  accountsservice                       0.6.40-2ubuntu11.3                         amd64        query and manipulate user account information
ii  acl                                   2.2.52-3                                   amd64        Access control list utilities
ii  acpi-call-dkms                        1.1.0-2                                    all          Kernel module that enables you to call ACPI methods
ii  adduser                               3.113+nmu3ubuntu4                          all          add and remove users and groups
ii  adwaita-icon-theme                    3.18.0-2ubuntu3.1                          all          default icon theme of GNOME (small subset)

Lecture notes

License

Creative Commons License

Linux Notes by Milad As (Ravexina) is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


ravexina's gitlab

ravexina's github