---
name: "dgrep"
section: "1"
platform: "linux"
package: "debian-goodies"
version: "0.88.2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dgrep"
---

# dgrep(1)

## NAME

dgrep, degrep, dfgrep, dzgrep -- grep through files belonging to an installed Debian package

## SYNOPSIS

**dgrep** \[*most grep options*\] *pattern* *package*...

**dgrep** **--help**

## DESCRIPTION

**dgrep** invokes [**grep**(1)](/grep/1.md) on each file in one or more installed Debian packages.

It passes the *package* argument(s) to [**dglob**(1)](/dglob/1.md) to retrieve a list of files in those packages. It uses dglob's substring pattern matching for the package names.

If **dgrep** is invoked as **degrep**, **dfgrep** or **dzgrep**, etc. then [**grep**(1)](/grep/1.md) with option `"-E"` or `"-F"` respectively the command [**zgrep**(1)](/zgrep/1.md) is used instead of [**grep**(1)](/grep/1.md).

## OPTIONS

**dgrep** supports most of [**grep**(1)](/grep/1.md)'s options. Please refer to your [**grep**(1)](/grep/1.md) documentation (i.e. the manpage or the texinfo manual) for a complete listing. Only a few options are excluded because they do not conform with the intended behaviour, see the list below.

### Options of grep that are not supported by dgrep

- **-r**, **--recursive**, **-d** *recurse*, **--directories**=*recurse*

  - **-d** *read*, **--directories**=*read*

  **dgrep** searches only in the "normal" files of a package. It skips all directories and symlinks. Therefore the options of grep that are specific to directories are not supported.

## AUTHOR

Matt Zimmerman \<mdz@debian.org\>

This manpage was written by Frank Lichtenheld \<frank@lichtenheld.de\>.

## COPYRIGHT AND LICENCE

Copyright (C) 2001 Matt Zimmerman \<mdz@debian.org\>.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

On Debian systems, a copy of the GNU General Public License version 2 can be found in */usr/share/common-licenses/GPL-2*.

## SEE ALSO

[**grep**(1)](/grep/1.md), [**zgrep**(1)](/zgrep/1.md), [**dglob**(1)](/dglob/1.md), [**regex**(7)](/regex/7.md), [**dpkg**(8)](/dpkg/8.md)
