+
+=head1 SYNOPSIS
+
+B<dh_clean> [S<I<debhelper options>>] [B<-k>] [B<-d>] [B<-X>I<item>] [S<I<file> ...>]
+
+=head1 DESCRIPTION
+
+B<dh_clean> is a debhelper program that is responsible for cleaning up after a
+package is built. It removes the package build directories, and removes some
+other files including F<debian/files>, and any detritus left behind by other
+debhelper commands. It also removes common files that should not appear in a
+Debian diff:
+ #*# *~ DEADJOE *.orig *.rej *.SUMS TAGS .deps/* *.P *-stamp
+
+It does not run "make clean" to clean up after the build process. Use
+L<dh_auto_clean(1)> to do things like that.
+
+B<dh_clean> (or "B<dh clean>") should be the last debhelper command run in the
+B<clean> target in F<debian/rules>.
+
+=head1 FILES
+
+=over 4
+
+=item F<debian/clean>
+
+Can list other files to be removed.
+
+=back
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-k>, B<--keep>
+
+This is deprecated, use L<dh_prep(1)> instead.
+
+=item B<-d>, B<--dirs-only>
+
+Only clean the package build directories, do not clean up any other files
+at all.
+
+=item B<-X>I<item> B<--exclude=>I<item>
+
+Exclude files that contain I<item> anywhere in their filename from being
+deleted, even if they would normally be deleted. You may use this option
+multiple times to build up a list of things to exclude.
+
+=item I<file> ...
+
+Delete these I<file>s too.
+
+=back
+
+=cut
+
+init(options => {
+ "dirs-only" => \$dh{D_FLAG},
+});
+inhibit_log();
+
+if ($dh{K_FLAG}) {
+ # dh_prep will be emulated (mostly) by the code below.
+ warning("dh_clean -k is deprecated; use dh_prep instead");
+}