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 fallbacks to deb.
The destination filename will not have the architecture
Create a symlink, instead of moving.
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 non-free and contrib
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. Use this
option with care, it's messy.
This option can used together with the -s option. If a
target directory isn't found it will be created
automatically. Use this option with care.-?, --help
Show the usage message and exit.
Show the version and exit.
Sets the color mode (since dpkg 1.18.5). The currently
accepted values are: auto (default), always and never.
If set, it will be used to decide whether to activate
Native Language Support, also known as
internationalization (or i18n) support (since dpkg
1.19.0). The accepted values are: 0 and 1 (default).
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)/dpkg(1), but other
installation tools might depend on this naming structure.
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
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
find -name '*.deb' | xargs -n 1 dpkg-name -a -o -s -cDon'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.
This page is part of the dpkg (Debian Package Manager) project.
Information about the project can be found at
⟨https://wiki.debian.org/Teams/Dpkg/⟩. If you have a bug report
for this manual page, see
page was obtained from the project's upstream Git repository
⟨https://salsa.debian.org/dpkg-team/dpkg.git⟩ on 2021-04-01. (At
that time, the date of the most recent commit that was found in
the repository was 2021-01-09.) If you discover any rendering
problems in this HTML version of the page, or you believe there
is a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
1.19.6-2-g6e42d5 2019-03-25 dpkg-name(1)