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. This operation
cannot be undone. If one or more PATH arguments appear, then only
the files named, or files contained with directories named, will be
Prompted are issued to confirm the removal of each file, unless
the --force flag is used or unless the file matches glob pattern
specified by the --clean option. No file that matches glob patterns
specified by --ignore or --keep will ever be deleted. The default
values for --clean, --ignore, and --keep are determined by the
(versionable) clean-glob, ignore-glob, and keep-glob settings.
Files and subdirectories whose names begin with "." are automatically
ignored unless the --dotfiles option is used.
The --verily option ignores the keep-glob and ignore-glob settings
and turns on --force, --dotfiles, and --emptydirs. Use the --verily
option when you really want to clean up everything. Extreme care
should be exercised when using the --verily option.
--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.
-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
--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
--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