---
name: "dpkg-name"
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-name"
---

# dpkg-name(1)

rename Debian packages to full package names

## NAME

dpkg-name - rename Debian packages to full package names

## SYNOPSIS

**dpkg-name** \[*option*...\] \[**--**\] *file*...

## DESCRIPTION

This manual page documents the **dpkg-name** program which provides an easy way to rename **Debian** packages into their full package names. A full package name consists of *package***\_***version***\_***architecture***.***package-type* as specified in the control file of the package. The *version* part of the filename consists of the upstream version information optionally followed by a hyphen and the revision information. The *package-type* part comes from that field if present or will fall back to **deb**.

## OPTIONS

- **-a**, **--no-architecture**

  The destination filename will not have the architecture information.

- **-k**, **--symlink**

  Create a symlink, instead of moving.

- **-o**, **--overwrite**

  Existing files will be overwritten if they have the same name as the destination filename.

- **-s**, **--subdir** \[*dir*\]

  Files will be moved into a subdirectory. If the directory given as argument exists the files will be moved into that directory otherwise the name of the target directory is extracted from the section field in the control part of the package. The target directory will be «unstable/binary-*architecture*/*section*». If the section is not found in the control, then **no-section** is assumed, and in this case, as well as for sections **contrib**, **non-free-firmware** and **non-free** the target directory is «*section*/binary-*architecture*». The section field is not required so a lot of packages will find their way to the **no-section** area.

  **Warning**: Use this option with care, it is messy.

- **-c**, **--create-dir**

  This option can used together with the **-s** option. If a target directory isn't found it will be created automatically.

  **Warning**: Use this option with care.

- **-?**, **--help**

  Show the usage message and exit.

- **-v**, **--version**

  Show the version and exit.

## ENVIRONMENT

- **DEB\_HOST\_ARCH**

  Sets the host architecture. This affects the architecture name used in the package filename.

- **DPKG\_COLORS**

  Sets the color mode. The currently accepted values are: **auto** (default), **always** and **never**.

  Supported since dpkg 1.18.5.

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

## BUGS

Some packages don't follow the name structure *package***\_***version***\_***architecture***.deb**. Packages renamed by **dpkg-name** will follow this structure. Generally this will have no impact on how packages are installed by [**dselect**(1)](/dselect/1.md)/[**dpkg**(1)](/dpkg/1.md), but other installation tools might depend on this naming structure.

## EXAMPLES

- **dpkg-name bar-foo.deb**

  The file **bar-foo.deb** will be renamed to bar-foo\_1.0-2\_i386.deb or something similar (depending on whatever information is in the control part of **bar-foo.deb**).

- **find /root/debian/ -name '\*.deb' \| xargs -n 1 dpkg-name -a**

  All files with the extension **deb** in the directory /root/debian and its subdirectory's will be renamed by **dpkg-name** if required into names with no architecture information.

- **find -name '\*.deb' \| xargs -n 1 dpkg-name -a -o -s -c**

  **Don't do this.** Your archive will be messed up completely because a lot of packages don't come with section information. **Don't do this.**

- **dpkg-deb --build debian-tmp && dpkg-name -o -s .. debian-tmp.deb**

  This can be used when building new packages.

## SEE ALSO

[**deb**(5)](/deb/5.md), [**deb-control**(5)](/deb-control/5.md), [**dpkg**(1)](/dpkg/1.md), [**dpkg-deb**(1)](/dpkg-deb/1.md).
