# man > deb-substvars(5)

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

## Quick Reference

- `${variable-name}` — variable substitution in control fields
- `debian/substvars` — file containing `name=value` lines
- `source:Version` — source package version
- `binary:Version` — binary package version (supports binNMU)
- `Installed-Size` — default computed from file sizes; can be overridden
- `shlibs:dependencyfield` — generated by `dpkg-shlibdeps`
- `${}{VAR}` — escape to produce literal `${VAR}`
- `-V name=value` — set variable from command line

## Name

deb-substvars — Debian source substitution variables

## Synopsis

- `debian/substvars`
- `debian/<binary-package>.substvars`

## Variables

Variable substitution has the form `${variable-name}`. Names consist of alphanumerics, hyphens, and colons, start with an alphanumeric, and are case-sensitive. Substitutions are performed repeatedly until none remain. The string `${}` is replaced with a literal `$` and can be used as an escape: `${}{VAR}` produces `${VAR}`.

Substitution occurs on all control fields except **Package**, **Source**, and **Architecture**. Variables can be set via the `-V` common option or in the substvars file (default `debian/substvars`, override with `-T`). The file consists of lines of the form `name=value`. Trailing whitespace, blank lines, and `#` comments are ignored.

### Architecture and Vendor

- `Arch` — current host architecture (equivalent to `DEB_HOST_ARCH`)
- `vendor:Name` — current vendor name (since dpkg 1.20.0)
- `vendor:Id` — lowercase variant of `vendor:Name` (since dpkg 1.20.0)

### Version Variables

- `source:Version` — source package version (since dpkg 1.13.19)
- `source:Upstream-Version` — upstream version including Debian epoch (since dpkg 1.13.19)
- `binary:Version` — binary package version, may differ during binNMU (since dpkg 1.13.19)
- `Source-Version` — **obsolete**; use `source:Version` or `binary:Version` instead
- `dpkg:Upstream-Version` — upstream version of dpkg (since dpkg 1.13.19)
- `dpkg:Version` — full version of dpkg (since dpkg 1.13.19)

### Source Description

- `source:Synopsis` — source package synopsis from `Description` field (since dpkg 1.19.0)
- `source:Extended-Description` — source package extended description from `Description` field (since dpkg 1.19.0)

### Size Variables

- `Installed-Size` — approximate total installed size in KiB. Default computed by summing sizes of regular files and symlinks (rounded to 1 KiB), with a 1 KiB baseline for other objects. Hardlinks counted once.
- `Extra-Size` — additional disk space; added to `Installed-Size` before writing the control field.

### Field Access

- `S:fieldname` — value of source stanza field `fieldname` (canonical capitalisation, since dpkg 1.18.11). Only available when generating binary control files.
- `F:fieldname` — value of output field `fieldname` (canonical capitalisation). Setting these variables has no effect except where expanded.

### Other

- `Format` — `.changes` file format version; setting it changes the **Format** field in `.changes`.
- `Newline`, `Space`, `Tab` — hold the corresponding characters.
- `shlibs:dependencyfield` — generated by `dpkg-shlibdeps`.
- `Source-Version` — obsolete, see above.

If a variable is referred to but not defined, a warning is issued and an empty value is assumed.

## Examples

Variable substitution on the **Description** field:

In `debian/control`:
Description: foo application
 ${Description}
 .
 More text.
If `${Description}` is set to `foo is bar.${Newline}foo is great.`, the result is:
Description: foo application
 foo is bar.
 foo is great.
 .
 More text.
## 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)