Searching for packages on Ubuntu

To find a list of installed packages use the dpkg command and its –get-selections switch. This is rather long so narrow it down with grep

dpkg --get-selections | grep w-scan

[blacksample text=”output:”]w-scan install

This gem gives us a list of the files from the package and where they were installed

dpkg -L w-scan
/.
/usr
/usr/bin
/usr/bin/w_scan
/usr/share
/usr/share/doc
/usr/share/doc/w-scan
/usr/share/doc/w-scan/README
/usr/share/doc/w-scan/README.file_formats.gz
...

To get a list of available packages use apt-cache and its search sub-command. You can use a regex as the pattern here so no need for grep.

apt-cache search 'w[-_]scan
qsstv - Qt-based slow-scan TV and fax
w-scan - Channel scanning tool for DVB and ATSC channels

Leave a Reply

Your email address will not be published. Required fields are marked *