REMOVE PRIVATE
Remove private items with the Unity Version Control CLI.
Read time 1 minuteLast updated 21 days ago
Description
Deletes a private file or directory. Warning: files deleted using the command are permanently erased, and are not recoverable. It is recommended that you use the '--dry-run' option to check which files will be affected by the command.Usage
cm remove | rm private <path>[ ...] [-R | -r | --recursive] [--ignored] [--verbose] [--dry-run]
Options
Option / Argument | Description |
|---|---|
| -R | -r | --recursive | Recursively deletes private files from within controlled directories. |
| --ignored | Deletes also ignored and cloaked files and directories. |
| --verbose | Prints all affected paths. |
| --dry-run | Runs the command without making any changes on disk. |
| path | Path of the files or directories to remove. Use double quotes (" ") to specify paths containing spaces. Use a whitespace to separate paths. |
Help
Remarks
If the path is a private file or directory, it will be deleted from disk. If the path is a controlled file, the command fails. If the path is a controlled directory, the command fails unless you specify the '-r' option, in which case it will delete all private files and directories below the specified directory.Examples
(Deletes 'private_directory'.)cm remove private private_directory
(Fails, because 'controlled_directory' is not private.)cm remove private c:\workspace\controlled_directory
(Deletes all private files and directories below 'controlled_directory'.)cm remove private -r c:\workspace\controlled_directory
(Shows all of the paths affected by the deletion of private files below 'controlled_directory' without actually deleting anything.)cm rm private --dry-run --verbose c:\workspace\controlled_directory -r
(Shows all of the paths affected by the deletion of private files below 'controlled_directory', performing the delete.)cm rm private --verbose c:\workspace\controlled_directory -r