Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Managing Debian Software with APT (apt-get etc)
Prev Home Next

5.2 Using dpkg to find package names

One of the ways to locate the name of a package is to know the name of an important file found within the package. For example, to find the package that provides a particular ".h" file you need for compilation you can run:

     # dpkg -S stdio.h
     libc6-dev: /usr/include/stdio.h
     libc6-dev: /usr/include/bits/stdio.h
     perl: /usr/lib/perl/5.6.0/CORE/nostdio.h


     # dpkg -S /usr/include/stdio.h
     libc6-dev: /usr/include/stdio.h

To find out the names of packages installed on your system, which is useful, for example, if you plan to clean up your hard drive, you can run:

     # dpkg -l | grep mozilla
     ii  mozilla-browse 0.9.6-7        Mozilla Web Browser

The problem with this command is that it can "break" the package name. In the example above, the full name of the package is mozilla-browser. To fix this, you can use the COLUMNS environment variable this way:

     [kov]@[couve] $ COLUMNS=132 dpkg -l | grep mozilla
     ii  mozilla-browser             0.9.6-7                     Mozilla Web Browser - core and browser

or the description or part of it this way:

     # apt-cache search "Mozilla Web Browser"
     mozilla-browser - Mozilla Web Browser

Managing Debian Software with APT (apt-get etc)
Prev Home Next

  Published under the terms of the GNU General Public License Design by Interspire