Virtuator

Help: clean
Login

The "clean" command:

Usage: fossil clean ?OPTIONS? ?PATH ...?

Delete all "extra" files in the source tree.  "Extra" files are files
that are not officially part of the checkout.  If one or more PATH
arguments appear, then only the files named, or files contained with
directories named, will be removed.

If the --prompt option is used, prompts are issued to confirm the
permanent removal of each file.  Otherwise, files are backed up to the
undo buffer prior to removal, and prompts are issued only for files
whose removal cannot be undone due to their large size or due to
--disable-undo being used.

The --force option treats all prompts as having been answered yes,
whereas --no-prompt treats them as having been answered no.

Files matching any glob pattern specified by the --clean option are
deleted without prompting, and the removal cannot be undone.

No file that matches glob patterns specified by --ignore or --keep will
ever be deleted.  Files and subdirectories whose names begin with "."
are automatically ignored unless the --dotfiles option is used.

The default values for --clean, --ignore, and --keep are determined by
the (versionable) clean-glob, ignore-glob, and keep-glob settings.

The --verily option ignores the keep-glob and ignore-glob settings and
turns on --force, --emptydirs, --dotfiles, and --disable-undo.  Use the
--verily option when you really want to clean up everything.  Extreme
care should be exercised when using the --verily option.

Options:
   --allckouts      Check for empty directories within any checkouts
                    that may be nested within the current one.  This
                    option should be used with great care because the
                    empty-dirs setting (and other applicable settings)
                    belonging to the other repositories, if any, will
                    not be checked.
   --case-sensitive <BOOL> override case-sensitive setting
   --dirsonly       Only remove empty directories.  No files will
                    be removed.  Using this option will automatically
                    enable the --emptydirs option as well.
   --disable-undo   WARNING: This option disables use of the undo
                    mechanism for this clean operation and should be
                    used with extreme caution.
   --dotfiles       Include files beginning with a dot (".").
   --emptydirs      Remove any empty directories that are not
                    explicitly exempted via the empty-dirs setting
                    or another applicable setting or command line
                    argument.  Matching files, if any, are removed
                    prior to checking for any empty directories;
                    therefore, directories that contain only files
                    that were removed will be removed as well.
   -f|--force       Remove files without prompting.
   -i|--prompt      Prompt before removing each file.  This option
                    implies the --disable-undo option.
   -x|--verily      WARNING: Removes everything that is not a managed
                    file or the repository itself.  This option
                    implies the --force, --emptydirs, --dotfiles, and
                    --disable-undo options.
                    Furthermore, it completely disregards the keep-glob
                    and ignore-glob settings.  However, it does honor
                    the --ignore and --keep options.
   --clean <CSG>    WARNING: Never prompt to delete any files matching
                    this comma separated list of glob patterns.  Also,
                    deletions of any files matching this pattern list
                    cannot be undone.
   --ignore <CSG>   Ignore files matching patterns from the
                    comma separated list of glob patterns.
   --keep <CSG>     Keep files matching this comma separated
                    list of glob patterns.
   -n|--dry-run     Delete nothing, but display what would have been
                    deleted.
   --no-prompt      This option disables prompting the user for input
                    and assumes an answer of 'No' for every question.
   --temp           Remove only Fossil-generated temporary files.
   -v|--verbose     Show all files as they are removed.

See also: addremove, extras, status