dpkg

From WebHostingNeeds.com
Jump to: navigation, search
  • dpkg -s Report status of specified package.


To get list of installed packages

dpkg --get-selections

To see if zip package installed

[email protected]:/# dpkg --get-selections | grep zip
bzip2                                           install
gzip                                            install
libmono-sharpzip2.84-cil                        install
unzip                                           install
zip                                             install
[email protected]:/#

You can also use "dpkg -l" or "dpkg --list"

[email protected]:/# dpkg -l | grep zip
ii  bzip2                                1.0.5-4                                         high-quality block-sorting file compressor -
ii  gzip                                 1.3.12-9ubuntu1                                 GNU compression utilities
ii  libmono-sharpzip2.84-cil             2.4.4~svn151842-1ubuntu4                        Mono SharpZipLib library (for CLI 2.0)
ii  unzip                                6.0-1build1                                     De-archiver for .zip files
ii  zip                                  3.0-2                                           Archiver for .zip files
[email protected]:/#


To see files of zip package

[email protected]:/# dpkg -L zip
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/zip
/usr/share/doc/zip/copyright
/usr/share/doc/zip/CHANGES.gz
/usr/share/doc/zip/TODO
/usr/share/doc/zip/WHATSNEW
/usr/share/doc/zip/changelog.Debian.gz
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/zipnote.1.gz
/usr/share/man/man1/zipsplit.1.gz
/usr/share/man/man1/zip.1.gz
/usr/share/man/man1/zipcloak.1.gz
/usr/bin
/usr/bin/zip
/usr/bin/zipcloak
/usr/bin/zipnote
/usr/bin/zipsplit
/usr/share/doc/zip/changelog.gz
[email protected]:/#


Find, which package owns "/usr/bin/wget"

[email protected]:/# dpkg -S /usr/bin/wget
wget: /usr/bin/wget
[email protected]:/#



apt-get

ubuntu

debian