# man > deb-substvars(5)

---
type: CommandReference
command: deb-substvars
mode: man
section: "5"
source: man-pages
---

## Quick Reference
- `${source:Version}` — source package version
- `${binary:Version}` — binary package version (may differ in binNMU)
- `${shlibs:Depends}` — shared library dependencies (from `dpkg-shlibdeps`)
- `${misc:Depends}` — miscellaneous dependencies (from helper tools)
- `${Arch}` — host build architecture
- Variable files: `debian/substvars`, `debian/package.substvars`
- Escape a literal `${VARIABLE}` as `${}{VARIABLE}`

## Name
deb-substvars — Debian source substitution variables

## Synopsis
- `debian/substvars`
- `debian/binary-package.substvars`

## Description
Before `dpkg-source`, `dpkg-gencontrol`, and `dpkg-genchanges` write their output, they replace tokens of the form `${variable-name}` with defined values. Substitutions are recursive until none remain; the literal string `${}` is replaced by `$`, allowing `${}{VARIABLE}` to output `${VARIABLE}`. Variables can be set with the **`-V`** common option or read from `debian/substvars` (or a file specified with **`-T`**). The file lines are `name=value`; blank lines and lines starting with `#` are ignored, trailing whitespace is stripped. Variable names are alphanumeric, may contain hyphens and colons, start with an alphanumeric, and are case‑sensitive. Fields `Package`, `Source`, and `Architecture` are exempt from substitution.

## Standard Variables

### Architecture & Vendoring
- `Arch` — current host architecture (= `DEB_HOST_ARCH`)
- `vendor:Name` — current vendor name (since dpkg 1.20.0)
- `vendor:Id` — lowercase variant of `vendor:Name`

### Version Variables
- `source:Version` — source package version
- `source:Upstream-Version` — upstream version, includes epoch if any
- `binary:Version` — binary package version (may differ for binNMU)
- `Source-Version` — **obsolete**; use `source:Version` or `binary:Version` instead

### Source Metadata
- `source:Synopsis` — source package synopsis from the source stanza `Description` field (since 1.19.0)
- `source:Extended-Description` — extended description from the source stanza `Description` field (since 1.19.0)

### Size Fields
- `Installed-Size` — approximate total installed size; if not set, `dpkg-gencontrol` computes a default (1 KiB baseline plus file sizes)
- `Extra-Size` — extra disk space added to `Installed-Size` before writing the control field

### Field Accessors
- `S:fieldname` — value of the source stanza field `fieldname` (canonical capitalisation; only available when generating binary control files)
- `F:fieldname` — value of the output field `fieldname`

### Literal Characters
- `Newline`, `Space`, `Tab` — the corresponding character

### Generated & System Variables
- `shlibs:dependencyfield` — generated by `dpkg-shlibdeps`
- `dpkg:Upstream-Version` — upstream version of dpkg
- `dpkg:Version` — full dpkg version
- `Format` — `.changes` file format version; setting it modifies the generated field

Undefined variables produce a warning and expand to an empty string.

## Files
- `debian/substvars` — list of substitution variables and values

## See Also
- [dpkg(1)](http://localhost/phpMan.php/man/dpkg/1/markdown)
- [dpkg-vendor(1)](http://localhost/phpMan.php/man/dpkg-vendor/1/markdown)
- [dpkg-genchanges(1)](http://localhost/phpMan.php/man/dpkg-genchanges/1/markdown)
- [dpkg-gencontrol(1)](http://localhost/phpMan.php/man/dpkg-gencontrol/1/markdown)
- [dpkg-shlibdeps(1)](http://localhost/phpMan.php/man/dpkg-shlibdeps/1/markdown)
- [dpkg-source(1)](http://localhost/phpMan.php/man/source/1/markdown)