DH_MOVEFILES(1)

πŸ’– DH_MOVEFILES β€” the debhelper manual page, bestie edition ✨

okay so this is a page from the Debhelper manual, and the tool is called dh_movefiles. Sit down, grab a lil matcha 🍡, we're moving files out of debian/tmp and into subpackages and it's gonna be so good.


🌸 NAME 🌸

dh_movefiles β€” move files out of debian/tmp into subpackages πŸ¦‹


✨ SYNOPSIS ✨

dh_movefiles [debhelper options] [--sourcedir=dir] [-Xitem] [file ...]

πŸ‘‘ DESCRIPTION πŸ‘‘

So dh_movefiles is a debhelper program, and its whole thing β€” its entire personality β€” is moving files out of debian/tmp (or honestly some other directory if you're feeling spicy) and into other package build directories. πŸ’…

When is this useful? Literally when your package has a Makefile that installs everything into debian/tmp, and you need to break that up into subpackages. That's the moment. That's the vibe.

🚨 bestie, real talk: dh_install is a much better program, and you are recommended to use it instead of dh_movefiles. no cap. this one is the old faithful, not the icon.

πŸŽ€ FILES πŸŽ€

  • debian/package.files β€” Lists the files to be moved into a package, separated by whitespace. The filenames listed should be relative to debian/tmp/. You can also list directory names, and the whole directory will be moved. 🧚 the whole thing. gone. relocated.

πŸ’… OPTIONS πŸ’…

  • --sourcedir=dir β€” Instead of moving files out of debian/tmp (the default, the classic, the blueprint), this option makes it move files out of some other directory. And listen β€” since the entire contents of the sourcedir is moved, specifying something like --sourcedir=/ is very unsafe, so to prevent mistakes, the sourcedir must be a relative filename; it cannot begin with a /. 🫢 protecting you from yourself, respectfully.
  • -Xitem, --exclude=item β€” Exclude files that contain item anywhere in their filename from being installed. anywhere!! mid-filename, end-filename, sneaky little substring β€” caught. πŸ™ˆ
  • file ... β€” Lists files to move. The filenames listed should be relative to debian/tmp/. You can also list directory names, and the whole directory will be moved. It is an error to list files here unless you use -p, -i, or -a to tell dh_movefiles which subpackage to put them in. (it's giving "sir, which package??" 😭)

🌈 NOTES 🌈

Note that files are always moved out of debian/tmp by default β€” even if you have instructed debhelper to use a compatibility level higher than one, which does not otherwise use debian/tmp for anything at all. Like, it doesn't even look at debian/tmp normally, but here we are, still going to debian/tmp. iconic behavior honestly.

The idea behind this is that the package that is being built can be told to install into debian/tmp, and then files can be moved by dh_movefiles from that directory. Any files or directories that remain are ignored, and get deleted by dh_clean later. so don't get attached πŸ’€ left behind = swept up.


πŸ”₯ SEE ALSO πŸ”₯

This program is a part of debhelper. ⭐


πŸ’œ AUTHOR πŸ’œ

Joey Hess <joeyh@debian.org>


okay and if you were wondering about the whole version vibe: this is 14.5ubuntu1, dated 2026-09-21. that's the tea, bestie β€” now go move those files. periodt. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from