checking whether a package is installed
Is there a quick, elegant way to check if a particular package is
installed?
Right now I just use dpkg -L. E.g.,
yomama[26]% dpkg -L msword
Package `msword' is not installed.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
yomama[27]% dpkg -L emacs20 | wc -l
904
yomama[28]%
This is more what I have in mind:
yomama[34]% dpkg -s junkbuster | grep "^Status:"
Status: install ok installed
yomama[35]%
... just a lotta keystrokes. i can make an alias/shell function, but it's
good to have something portable when helping others debug their system,
etc.
Aaron
Reply to: