dpkg-realpath(1)

๐Ÿ’– NAME ๐Ÿ’–

dpkg-realpath โ€” print the resolved pathname with DPKG_ROOT support โœจ

This is the dpkg-realpath(1) page from the dpkg suite, and yes bestie, it's a whole little tool for resolving paths the dpkg way ๐Ÿซถ

โœจ SYNOPSIS โœจ

dpkg-realpath [option...] pathname

๐Ÿ’… DESCRIPTION ๐Ÿ’…

Okay so dpkg-realpath is a tool to resolve a pathname โ€” and the iconic behavior is that it takes the dpkg(1) root directory into account ๐Ÿ”ฅ It can get that root implicitly from the DPKG_ROOT environment variable, or from the command-line --root or --instdir options, and then it returns an absolute pathname relative to the root directory. The root directory must not be prefixed to the pathname to be resolved โ€” like, pls don't do that ๐Ÿ™ˆ

This is intended to be used by other dpkg helpers, or by maintainer scripts instead of using realpath(1) or readlink(1) to canonicalize pathnames, because those latter commands do not support canonicalization relative to a different root than /. So if you're canonicalizing against some other root, this is the main character ๐Ÿ’…

This program was introduced in dpkg 1.20.1 โญ

๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -z, --zero โ€” use a NUL byte to end output lines instead of a new line character. Supported since dpkg 1.20.6 โœจ
  • --instdir directory, --root directory โ€” set the root directory to directory, which is the base directory that pathnames get canonicalized against. Defaults to ยซ/ยป if DPKG_ROOT has not been set ๐ŸŒˆ
  • -?, --help โ€” show the usage message and exit ๐Ÿซถ
  • --version โ€” show the version and exit ๐Ÿ’–

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • DPKG_ROOT โ€” if set and the --instdir or --root options have not been specified, it will be used as the filesystem root directory ๐Ÿฆ‹
  • DPKG_COLORS โ€” sets the color mode. The currently accepted values are: auto (default), always and never ๐ŸŽจ
  • DPKG_NLS โ€” if set, it will be used to decide whether to activate Native Language Support, also known as internationalization (or i18n) support. The accepted values are: 0 and 1 (default). Supported since dpkg 1.22.7 ๐ŸŒธ

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

Go peek at realpath(1) and readlink(1) ๐Ÿ’œ


Source/version 1.23.11-dirty, dated 2026-09-09, and you were reading the dpkg-realpath(1) page โ€” byeee bestie ๐Ÿซถ๐Ÿ’–

๐Ÿ“ฆ where this page comes from