dwww Home | Manual pages | Find package

dlocate(1)                         dpkg suite                        dlocate(1)

NAME
       dlocate - program to view debian package information

SYNOPSIS
       dlocate [option...] [command]

DESCRIPTION
       dlocate is a fast alternative to dpkg for queries like "dpkg -L" and
       "dpkg -S".

COMMANDS
       pattern...
           List  all  records  where  either  the  package name or the filename
           matches pattern.

           Note that dlocate uses GNU grep,  so  normal  regexp  metacharacters
           need  to  be  taken  into  account or avoided by using the -F (Fixed
           String) grep option.

           For example, to search for "/usr/bin/[", you might try:

             dlocate '/usr/bin/\['

           or

             dlocate -F '/usr/bin/['

       -S filename...
           List all records  where  only  the  filename  matches  the  filename
           pattern.

           Note  that  dlocate  uses  GNU grep, so normal regexp metacharacters
           need  to  be  taken  into  account.   Fixed  String   searches   are
           incompatible with -S.

           For example, to search for "/usr/bin/[", you need to type:

             dlocate  '/usr/bin/\['

       -l package...
           Regexp-enhanced  emulation  of  "dpkg -l".  Shows all packages which
           match package.

           Internally this uses grep  on  a  file  containing  the  reformatted
           output of "dpkg -l" (four fields separated by tabs; status, package-
           name,  installed  version,  short  description)  so  it  will return
           packages whose version or short description matches, too.

           Various flavours of regular expression are supported.  For  example,
           Extended Regexp:

             dlocate -l '^..[[:space:]]libc6'

           or Perl Regexp:

             dlocate -P -l '^..\slibc6'

           Both  of  these  will  list  all the packages whose names start with
           "libc6".

           Note that because of the difference between regular expressions  and
           dpkg's shell-style pattern matching, the output from "dlocate -l" is
           occasionally different to the output from "dpkg -l".

           This  is  not  a bug, regular expressions are far more flexible than
           shell pattern matching. This is the way dlocate is supposed to  run,
           but  it may require some knowledge of regular expressions to get the
           output you want.

       -k  List package names of installed kernels and all related packages.

       -K  Detailed list of installed kernels and all related packages.

       -L package...
           List all files in package.

           The output order is preserved from the one used by dpkg-query, which
           preserves the order  from  the  .deb  archive,  where  symlinks  are
           provided  at  the  end  to  guarantee they point to already unpacked
           entries in the filesystem.

       -s package...
           Print status of package.

       --ls package...
           "ls -ldF" of all files in package.

       --lsconf package...
           "ls -ldF" of conffiles in package.

       --conf package...
           List conffiles in package.

       --du package...
           "du -sck" of all files in package.

       --md5sum package...
           List md5sums (if any) of package.

       --md5check package...
           Check md5sums (if any) of package.

       --man package...
           List man pages (if any) in package.

       --lsman package...
           List full path/filenames of man pages (if any) in package.

       --lsbin package...
           List full path/filenames of executable files (if any) in package.

       --lsdir package...
           List only the directories in package.

OPTIONS
       --filename-only
           Only output file names when searching for files.

       --package-only
           Only output package names when searching for files.

       -w, --word-regexp
           Select only those lines containing matches that  form  whole  words.
           The  test  is  that  the  matching  substring  must either be at the
           beginning of  the  line,  or  preceded  by  a  non-word  constituent
           character.   Similarly,  it must be either at the end of the line or
           followed by  a  non-word  constituent  character.   Word-constituent
           characters are letters, digits, and the underscore.

       -i, --ignore-case
           Ignore case distinctions in the pattern.

       -E, --extended-regexp
           Interpret  pattern  as  an extended regular expression.  This is the
           default.

       -F, --fixed-strings
           Interpret pattern as a list of fixed strings, separated by newlines,
           any of which is to be matched.

       -G, --basic-regexp
           Interpret pattern as a basic regular expression.

       -P, --perl-regexp
           Interpret pattern as a Perl regular expression.  This is  considered
           to   be  highly  experimental  within  GNU  grep  and  may  warn  of
           unimplemented features.

       -h, --help
           Display help message and exit.

       -V, --version
           Display dlocate's version number and exit.

       -v, --verbose, --debug
           Produce verbose debugging output.

       -c, --columns[=columns]
           Set columns width to override  the  dlocate  default  of  using  the
           entire terminal line width.  Any value for columns less than 80 will
           be increased to 80.

       -C, --color
           Colorize -l or -s output (requires supercat to be installed).

FILES
       /etc/default/dlocate
           Configuration  file  with default options. Currently the only option
           is to enable/disable gzip compression of /var/lib/dlocate/dlocatedb.

       /var/lib/dlocate/dlocatedb
           Plain  text  listing  of  all  files  belonging  to   all   packages
           (optionally compressed).

       /var/lib/dlocate/dpkg-list
           Listing of all packages known to dpkg.

           See update-dlocatedb(8) for details.

EXAMPLES
       To find which package "/usr/bin/[" belongs to:

         dlocate '/usr/bin/\['

       To view all man pages contained within the dpkg package:

         man $(dlocate -man dpkg)

       To purge kernel version 2.6.28.7 and all related module packages:

         dlocate -k | grep -- -2.6.28.7 | xargs apt-get purge

       To check the md5sums of the dlocate package:

         dlocate --md5check dlocate

       To  use  dpkg-repack  to  make  a  backup  copy  of all installed mythtv
       packages just before upgrading them:

         dlocate -l mythtv | awk '/^.i/ {print $2}' | xargs dpkg-repack

         # dlocate -l mythtv | awk '/^.i/ {print $2}' | xargs dpkg-repack
         dpkg-deb: building package `libmythtv-perl' in `./libmythtv-perl_0.21.svn20090414-0.0_amd64.deb'.
         dpkg-deb: building package `mythtv' in `./mythtv_0.21.svn20090414-0.0_amd64.deb'.
         dpkg-deb: building package `mythtv-backend' in `./mythtv-backend_0.21.svn20090414-0.0_amd64.deb'.
         dpkg-deb: building package `mythtv-common' in `./mythtv-common_0.21.svn20090414-0.0_amd64.deb'.
         dpkg-deb: building package `mythtv-database' in `./mythtv-database_0.21.svn20090414-0.0_amd64.deb'.
         dpkg-deb: building package `mythtv-doc' in `./mythtv-doc_0.21.svn20090414-0.0_amd64.deb'.
         dpkg-deb: building package `mythtv-frontend' in `./mythtv-frontend_0.21.svn20090414-0.0_amd64.deb'.
         dpkg-deb: building package `mythtv-perl' in `./mythtv-perl_0.21.svn20090414-0.0_amd64.deb'.
         dpkg-deb: building package `mythtv-status' in `./mythtv-status_0.9.0-5_amd64.deb'.
         dpkg-deb: building package `mythtv-themes' in `./mythtv-themes_0.21-0.0_amd64.deb'.
         dpkg-deb: building package `mythtvfs' in `./mythtvfs_0.5.2-2_amd64.deb'.
         dpkg-deb: building package `python-mythtv' in `./python-mythtv_0.21.svn20090414-0.0_amd64.deb'.

NOTES
       dlocate does not update its databases (see FILES section)  automatically
       after  new or upgraded packages have been installed with dpkg or apt-get
       etc.

       A daily cron job is run to perform the update.  Or the root user can run
       update-dlocatedb at any time to force an update.

ENVIRONMENT
       COLUMNS
           Sets the number  of  columns  dlocate  should  use  when  displaying
           formatted  text.   Currently  only used by -l.  Values lower than 80
           are increased to 80.

SEE ALSO
       dpkg(1), update-dlocatedb(8), grep(1), grep-dctrl(1).

1.17                               2024-11-25                        dlocate(1)

Generated by dwww version 1.16 on Tue Dec 16 06:19:05 CET 2025.