1DEBCLEAN(1)                 General Commands Manual                DEBCLEAN(1)
2
3
4

NAME

6       debclean - clean up a sourcecode tree
7

SYNOPSIS

9       debclean [options]
10

DESCRIPTION

12       debclean  walks  through  the  directory tree starting at the directory
13       tree in which it was invoked, and executes debuild --  clean  for  each
14       Debian  source directory encountered.  These directories are recognised
15       by containing a debian/changelog file for a package whose name  matches
16       that of the directory.  Name matching is described below.
17
18       If debclean is invoked from a directory that is already a Debian source
19       package, it will not descend into its subdirectories.
20
21       Also, if the --cleandebs option is given, then in every directory  con‐
22       taining  a  Debian  source  tree,  all files named *.deb, *.changes and
23       *.build are removed.  The .dsc, .diff.gz and the  (.orig).tar.gz  files
24       are  not touched so that the release can be reconstructed if necessary,
25       and the .upload files are left so that debchange  functions  correctly.
26       The --nocleandebs option prevents this extra cleaning behaviour and the
27       --cleandebs option forces it.  The default is not to clean these files.
28
29       debclean uses debuild(1) to clean the source tree.
30

Directory name checking

32       In common with several other scripts in the  devscripts  package,  deb‐
33       clean   will   walk   through   the   directory   tree   searching  for
34       debian/changelog files.  As a safeguard  against  stray  files  causing
35       potential  problems,  it  will examine the name of the parent directory
36       once it finds a debian/changelog file, and  check  that  the  directory
37       name  corresponds  to  the package name.  Precisely how it does this is
38       controlled      by      two      configuration      file      variables
39       DEVSCRIPTS_CHECK_DIRNAME_LEVEL  and DEVSCRIPTS_CHECK_DIRNAME_REGEX, and
40       their  corresponding  command-line  options  --check-dirname-level  and
41       --check-dirname-regex.
42
43       DEVSCRIPTS_CHECK_DIRNAME_LEVEL can take the following values:
44
45       0      Never check the directory name.
46
47       1      Only check the directory name if we have had to change directory
48              in our search for debian/changelog.  This is the default  behav‐
49              iour.
50
51       2      Always check the directory name.
52
53       The  directory name is checked by testing whether the current directory
54       name (as determined by pwd(1)) matches the regex given by the  configu‐
55       ration  file  option  DEVSCRIPTS_CHECK_DIRNAME_REGEX  or by the command
56       line option --check-dirname-regex regex.  Here regex is  a  Perl  regex
57       (see  perlre(3perl)),  which  will be anchored at the beginning and the
58       end.  If regex contains a '/', then it must match  the  full  directory
59       path.   If  not,  then it must match the full directory name.  If regex
60       contains the string ´PACKAGE', this will  be  replaced  by  the  source
61       package  name, as determined from the changelog.  The default value for
62       the regex is: ´PACKAGE(-.+)?', thus matching directory  names  such  as
63       PACKAGE and PACKAGE-version.
64

OPTIONS

66       --cleandebs
67              Also  remove all .deb, .changes and .build files from the parent
68              directory.
69
70       --nocleandebs
71              Do not remove the .deb, .changes and .build files from the  par‐
72              ent directory; this is the default behaviour.
73
74       --check-dirname-level N
75              See the above section Directory name checking for an explanation
76              of this option.
77
78       --check-dirname-regex regex
79              See the above section Directory name checking for an explanation
80              of this option.
81
82       --no-conf, --noconf
83              Do  not  read any configuration files.  This can only be used as
84              the first option given on the command-line.
85
86       -d     Do not run dpkg-checkbuilddeps to check build dependencies.
87
88       --help Display a help message and exit successfully.
89
90       --version
91              Display version and copyright information and exit successfully.
92

CONFIGURATION VARIABLES

94       The two configuration files /etc/devscripts.conf and ~/.devscripts  are
95       sourced  in  that  order  to set configuration variables.  Command line
96       options can be used to override configuration file settings.   Environ‐
97       ment  variable  settings  are  ignored for this purpose.  The currently
98       recognised variables are:
99
100       DEBCLEAN_CLEANDEBS
101              If this is set to yes, then it is the same  as  the  --cleandebs
102              command line parameter being used.
103
104       DEVSCRIPTS_CHECK_DIRNAME_LEVEL, DEVSCRIPTS_CHECK_DIRNAME_REGEX
105              See the above section Directory name checking for an explanation
106              of these variables.  Note that these are package-wide configura‐
107              tion variables, and will therefore affect all devscripts scripts
108              which check their value, as described in their  respective  man‐
109              pages and in devscripts.conf(5).
110

SEE ALSO

112       debuild(1), devscripts.conf(5)
113

AUTHOR

115       Christoph Lameter <clameter@debian.org>; modifications by Julian Gilbey
116       <jdg@debian.org>.
117
118
119
120DEBIAN                         Debian Utilities                    DEBCLEAN(1)
Impressum