How to search for installed .deb and dpkg packages in Linux !

Debian packages or .deb files are the default package format in Ubuntu Linux and other Debian related distro’s. Many times we need to find the correct package installed also we might need to search for a particular installed package in some directory then the below given tutorial comes very handy.

dpkg is a command line tool that you use to install, build, remove and manage Debian packages. dpkg maintains some usable information about available packages. You can search for a filename from installed packages using dpkg -S command. For example, find out package name for /bin/ls, enter:
$ dpkg -S /bin/ls
Sample output:

coreutils: /bin/ls

You can also obtain detailed status information about coreutils package, enter:

$ dpkg -s coreutils

You can also use dpkg-query command which is a tool to show information about packages listed in the dpkg database. The -l option search for a filename from installed packages. All standard shell wildcards can be used in the pattern. This command will not list extra files created by maintainer scripts, nor will it list alternatives.

# dpkg-query -l 'google-chrome'

The output is as follows:-

apt-file Command

You need to install apt-file command which is a command line tool for searching files in packages for the APT package management system:

# apt-get install apt-file
# apt-file update

To search in which package a file is included, enter:

$ apt-file search date

This is a quickie on how install, uninstall, and search for applications/packages in Ubuntu Linux from the Terminal window.

apt-cache search firefox

firefox being the full or partial name of the package/application for the mozilla firefox browser.

That’s it for now.

Njoy !

via:- askubuntu.com

Akash Angle

I am a Full time Linux user who has quit using Windows for unknown reasons, making my life truly open source.

Recent Posts

Get the most juice from your ISP/router — setting MTU size & other handy tweaks

This is not an ad-vocation by any means for TP-link branding, however a real life…

3 months ago

How to make any Android phone up-to 3x faster – Developer options unleashed

First of all we need to hit the kernel version on any Android device. You…

3 months ago

systemd-resolve command not found in Ubuntu Desktop

Use resolvectl status instead. It's like something deprecates and suddenly things get broken! In systemd…

8 months ago

How to exclude multiple directories with rsync?

Geeky question: This is what people and friends have tried: rsync -arv --exclude "/home/john/.ccache:/home/ben/build" /home/john…

8 months ago

How to resolve apt-get -f not working

You might encounter this error which appears to be very common on Debian based Distro's…

8 months ago

How to install Broadcom STA wireless drivers on Kali Linux

PS: This article is for only Kali Linux users, that too having a Broadcom Wireless…

9 months ago