clean¶
vb clean [OPTIONS] [PATH ...]
Description¶
Delete all extra files in the source tree. Extra files are files
that are not officially part of the check-out. 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 check-outs 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
--emptydirsoption 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-undooption.
- -x, --verily¶
WARNING: Removes everything that is not a managed file or the repository itself. This option implies the
--force,--emptydirs,--dotfiles, and--disable-undooptions. Furthermore, it completely disregards the keep-glob and ignore-glob settings. However, it does honor the--ignoreand--keepoptions.
- --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¶
Do not prompt the user for input and assume an answer of
Nofor every question
- --temp¶
Remove only VisionByte-generated temporary files
- -v, --verbose¶
Show all files as they are removed
Examples¶
Init and open a repository
$ vb init clean_repo.vbyte
project-id: af36e49b91931d68fe3312c44e9f7b9fba5163b6
server-id: d91dd7b8d8fd4900ddae53951449e7e9d9a310a4
admin-user: ubuntu (initial remote-access password is "qyLRV2N59s")
$ vb open -f clean_repo.vbyte
project-name: <unnamed>
repository: /tmp/sphinx_tests/053ecddf/clean_repo/clean_repo.vbyte
local-root: /tmp/sphinx_tests/053ecddf/clean_repo/
config-db: /tmp/sphinx_tests/053ecddf/.visionbyte
project-code: af36e49b91931d68fe3312c44e9f7b9fba5163b6
checkout: 9c340f45f8530015905863b0afd2912cc8f27771 2026-03-31 13:00:09 UTC
tags: trunk
comment: initial empty check-in (user: ubuntu)
check-ins: 1
List unmanaged files (including dotfiles)
$ vb sys echo "keep" > readme.md
$ vb add readme.md
ADDED readme.md
$ vb ci -m "add readme"
Committed version: 7548a4433130d805c101627c3fb67a3e05d66e8a0221222efc56200f382ff8ea
$ vb sys mkdir build
$ vb sys echo "tmp" > build/out.tmp
$ vb sys echo "log" > build/run.log
$ vb sys echo "log" > scratch.log
$ vb sys touch .hidden
$ vb changes --extra --dotfiles
.hidden
build/out.tmp
build/run.log
scratch.log
Preview what clean would remove (keep logs in the root and under build/)
$ vb clean --dry-run --keep "*.log,build/*.log" --dotfiles --no-prompt -v
Removed unmanaged file: .hidden
Removed unmanaged file: build/out.tmp
KEPT file "build/run.log" not removed (due to --keep or "keep-glob")
KEPT file "scratch.log" not removed (due to --keep or "keep-glob")
Remove unmanaged files only in build/
$ vb clean --force --dotfiles build --no-prompt -v
Removed unmanaged file: build/out.tmp
Removed unmanaged file: build/run.log
"vb undo" is available to undo changes to the working checkout.
Remove any remaining unmanaged files (keep logs again)
$ vb clean --force --keep "*.log,build/*.log" --dotfiles --no-prompt -v
Removed unmanaged file: .hidden
KEPT file "scratch.log" not removed (due to --keep or "keep-glob")
"vb undo" is available to undo changes to the working checkout.