dpkg-name(1)
π dpkg-name(1) β the dpkg suite's own glow-up artist
Okay bestie, so this is the manual for dpkg-name, a program from the dpkg suite, and honestly? It's giving personal stylist for your .deb files. It renames Debian packages into their full package names, easy as that. β¨
A full package name is literally package_version_architecture.package-type, exactly as specified in the package's control file. The version part of the filename is the upstream version info, optionally followed by a hyphen and the revision info. The package-type part comes from that field if it's present β and if it's not? It falls back to deb. No cap. π«Ά
β¨ SYNOPSIS β¨
dpkg-name [option...] [--] file...
πΈ DESCRIPTION πΈ
So dpkg-name's whole thing is taking your packages and giving them the full-name treatment. The full name is package_version_architecture.package-type, straight from the control file. Version part = upstream version, optionally plus a hyphen and the revision. Package-type part = that field if it exists, otherwise deb. Periodt. π
π OPTIONS π
-a,--no-architectureβ the destination filename gets no architecture info. Bye, arch.-k,--symlinkβ makes a symlink instead of moving the file. Iconic, non-destructive.-o,--overwriteβ existing files get overwritten if they've got the same name as the destination filename. So likeβ¦ be aware. π₯-s,--subdir [dir]β files get moved into a subdirectory. If the directory you passed as the argument exists, they go in there. Otherwise the target directory name gets extracted from thesectionfield in the control part of the package. The target directory will be Β«unstable/binary-architecture/sectionΒ». If the section isn't found in the control, thenno-sectionis assumed β and in that case, as well as for the sectionscontrib,non-free-firmwareandnon-free, the target directory is Β«section/binary-architectureΒ». The section field isn't required, so a lot of packages will find their way into theno-sectionarea. π
β οΈ Warning: use this option with care, it is messy. Like, actual mess. Fr fr.
-c,--create-dirβ can be used together with the-soption. If a target directory isn't found, it gets created automatically. Slay, butβ
β οΈ Warning: use this option with care. π«Ά
-?,--helpβ shows the usage message and exits. The classic.-v,--versionβ shows the version and exits. Also the classic.
π¦ ENVIRONMENT π¦
DEB_HOST_ARCHβ sets the host architecture. This affects the architecture name used in the package filename. Lowkey important.DPKG_COLORSβ sets the color mode. The currently accepted values are:auto(default),alwaysandnever.
Supported since dpkg 1.18.5. β
DPKG_NLSβ if set, it decides whether to activate Native Language Support, also known as internationalization (or i18n) support. The accepted values are:0and1(default).
Supported since dpkg 1.19.0. π
π BUGS π
Not every package follows the package_version_architecture.deb name structure, and that's just reality. π Packages renamed by dpkg-name will follow this structure. Generally this has no impact on how packages are installed by dselect(1)/dpkg(1) β but other installation tools might depend on this naming structure. So like, iykyk. π
π 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). Main character rename energy. π
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. Cute. β¨
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. π Not me warning you twice. Don't.
dpkg-deb --build debian-tmp && dpkg-name -o -s .. debian-tmp.deb
This can be used when building new packages. Chef's kiss. π
π SEE ALSO π
deb(5), deb-control(5), dpkg(1), dpkg-deb(1).
And that's the whole vibe check, bestie β brought to you by dpkg suite version 1.23.11-dirty, dated 2026-09-09. Go forth and rename responsibly. ππ¦πΈ
π¦ 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