---
name: "dpkg-buildapi"
section: "1"
platform: "linux"
package: "dpkg"
version: "1.23.11-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/dpkg-buildapi"
---

# dpkg-buildapi(1)

returns the build API level to use during package build

## NAME

dpkg-buildapi - returns the build API level to use during package build

## SYNOPSIS

**dpkg-buildapi** \[*option*...\] \[*command*\]

## DESCRIPTION

**dpkg-buildapi** is a tool to retrieve the [**dpkg-build-api**(7)](/dpkg-build-api/7.md) level to use during build of source Debian packages.

This program was introduced in dpkg 1.22.0.

## COMMANDS

- **--help**

  Show the usage message and exit.

- **--version**

  Show the version and exit.

## OPTIONS

- **-c***control-file*

  Specifies the main source control file to read information from. The default is *debian/control*.

## ENVIRONMENT

- **DPKG\_BUILD\_API**

  The build API level to use. This is intended to be used internally by the tools executed from *debian/rules* to avoid having to parse *debian/control* multiple times, and not to set the global build API level from *debian/rules*, otherwise build drivers (such as [**dpkg-buildpackage**(1)](/dpkg-buildpackage/1.md)) cannot access it.

- **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).

## FILES

### Packaging support

- **/usr/share/dpkg/buildapi.mk**

  Makefile snippet that parses the build API level into a variable.
