# Finding package names which contains a known file with apt

**URL:** <https://linux-tips.com/t/finding-package-names-which-contains-a-known-file-with-apt/167>\
**Category:** Distributions\
**Created:** [May 1, 2008, 5:58pm UTC](https://linux-tips.com/t/finding-package-names-which-contains-a-known-file-with-apt/167 "2008-05-01T17:58:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![demirten](https://linux-tips.com/user_avatar/linux-tips.com/demirten/32/64_2.png) [@demirten](https://linux-tips.com/u/demirten)\
**Post date:** [May 1, 2008, 5:58pm UTC](https://linux-tips.com/t/finding-package-names-which-contains-a-known-file-with-apt/167/1 "2008-05-01T17:58:50Z")

</div>

If you know a filename from a package which you want to install, you can use `apt-file` utility to find package names.

apt-file searchs within both of the installed and not installed packages for files that you may need. For example if you want to find package name which contains `stdio.h` file:

```
apt-file search stdio.h

```

If you’re using the first time, apt-file needs to be index package contents with:

```
apt-file update

```

If you’re not interested about package names which are not installed your system but you want to learn which packages provides your installed stdio.h file, `dpkg` comes to help:

```
dpkg -S stdio.h
```
