fossil-rm
Remove files from the Fossil repository
TLDR
View documentation for the original command
SYNOPSIS
fossil rm [OPTIONS] FILENAME …
PARAMETERS
--case-sensitive NAME
Enable case-sensitive filename matching.
--chdir DIRECTORY
Change working directory before processing.
--clean
Also delete files from local disk after untracking.
--empty-dirs
Remove any empty directories left behind.
--soft
Untrack files without staging deletion (keep in checkout).
--verily
Disambiguate ambiguous filenames.
-R|--repository REPO
Use specific repository file.
--workdir DIR
Specify working directory.
DESCRIPTION
The fossil rm command removes one or more files from the set of files tracked by a Fossil repository. It stages the deletions for the next fossil commit, updating the repository manifest without altering the local checkout unless the --clean option is used.
By default, fossil rm only untracks files, leaving them intact on disk. This is useful for excluding files from version control while preserving local copies. Specify multiple filenames or use wildcards. Fossil verifies that files are part of the checkout before removal.
It handles directory trees implicitly; removed files update the baseline. Use --soft to untrack without staging deletion, or --empty-dirs to prune empty directories. Always run fossil status afterward to confirm changes before committing.
Ideal for cleaning up ignored files, temporary artifacts, or obsolete code in Fossil-managed projects.
CAVEATS
Files are not deleted from disk by default; use --clean cautiously to avoid data loss. Wildcards may not expand as expected in all shells. Requires files to be in current checkout.
EXAMPLES
fossil rm file.txt
Stage deletion of file.txt.
fossil rm --clean *.tmp
Remove temp files from repo and disk.
fossil rm --soft docs/old.pdf
Untrack without staging or deleting.
EXIT CODES
0: Success.
1: Error (e.g., file not found or not managed).
HISTORY
Introduced in early Fossil versions (~2007) by D. Richard Hipp as part of core SCM commands. Evolved with options like --clean (v1.0+) for Git-like behavior; actively maintained in Fossil 2.x series.


