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 โจ--instdirdirectory,--rootdirectory โ set the root directory to directory, which is the base directory that pathnames get canonicalized against. Defaults to ยซ/ยป ifDPKG_ROOThas not been set ๐-?,--helpโ show the usage message and exit ๐ซถ--versionโ show the version and exit ๐
๐ ENVIRONMENT ๐
DPKG_ROOTโ if set and the--instdiror--rootoptions 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),alwaysandnever๐จ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:0and1(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
- arch rolling: dpkg 1.23.11-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms