DH_CLEAN(1)
β¨ DH_CLEAN β¨
okay bestie, welcome to the Debhelper manual page for dh_clean, and honestly? she's the cleanup crew of your dreams π
πΈ NAME πΈ
dh_clean β she cleans up package build directories. that's it. that's the job. iconic behavior.
π¦ SYNOPSIS π¦
dh_clean [debhelper options] [-k] [-d] [-Xitem] [path ...]
π DESCRIPTION π
so dh_clean is a debhelper program and its whole personality is cleaning up. she should be the last step of the clean target, fr fr, because all the other debhelper commands just kinda assume she's gonna clean up after them. main character energy, truly.
she removes the package build directories, plus a bunch of other files like debian/files, plus any lil detritus the other debhelper commands left lying around. she also yeets the common files and directories that have NO business showing up in a Debian diff:
#*# *~ DEADJOE *.orig *.rej *.SUMS __pycache__ TAGS .deps/* *.P *-stamp
π ngl she does not runmake cleanto clean up after the build process. if that's the energy you want, go talk todh_auto_clean(1)instead, bestie.
π FILES π
debian/cleanβ you can list extra paths in here that you want removed too π§Ή- heads up tho: directories listed in this file must end with a trailing slash. and yes, any content inside those directories gets removed as well. all of it. no survivors.
- she supports substitution variables in compat 13 and later, as documented in
debhelper(7). slay.
π OPTIONS π
-k,--keepβ okay so this one is deprecated, usedh_prep(1)instead. and just so we're clear: the option is removed in compat 12. she's gone, bestie.-d,--dirs-onlyβ only clean the package build directories. do not clean up any other files at all. just the dirs. nothing else. periodt. π-Xitem,--exclude=itemβ excludes files that contain item anywhere in their filename from being deleted, even if they'd normally get deleted. you can use this option multiple times to build up a whole list of things to exclude π«Άpath ...β delete these paths too ποΈ- same rule as before: directories passed as arguments must end with a trailing slash. any content in these directories will be removed as well.
π SEE ALSO π
this program is a part of debhelper. β¨
π AUTHOR π
Joey Hess <joeyh@debian.org> β king behavior, we stan π
one last lil vibe check from your girl:
she removes build dirs, she removesdebian/files, she removes the stray junk β but remember,dh_cleanshould be the last step of thecleantarget, because everyone else is counting on her. no pressure tho. π
and that's the whole page, bestie β this was DH_CLEAN(1) from the Debhelper manual, version 14.5ubuntu1, dated 2026-09-21. love u, go clean your build dirs πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: debhelper 14.5ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms