Name

svk delete — Delete an item from a working copy or a depot.

Synopsis

svk delete PATH...
svk delete DEPOTPATH

Description

Items specified by PATH are scheduled for deletion upon the next commit. Files (and directories that have not been committed) are immediately removed from the working copy. The command will not remove any modified items or items scheduled for addition; use the svk revert first for those.

Items specified by DEPOTPATH are deleted from the repository via an immediate commit. Multiple DEPOTPATHS are currently not supported.

Alternate Names

del, remove, rm

Changes

Working copy if operating on files, Depot if operating on a DEPOTPATH, Mirrored repository if operation on a mirrored DEPOTPATH

Accesses Depot

Only if operating on a DEPOTPATH

Accesses Mirrored Repository

Only if operating on a mirrored DEPOTPATH

Switches

--keep-local (-K)
--message (-m)
--file (-F)
--template
--encoding ENC
--patch (-P) NAME
--sign (-S)
--check-only (-C)
--direct

Examples

Using svk to delete a file from your working copy merely schedules it to be deleted. When you commit, the file is deleted in the depot.

$ svk delete myfile
D   myfile
$ svk commit --message "Deleted file 'myfile'."
Committed revision 14.

Deleting a DEPOTPATH, however, is immediate, so you have to supply a log message:

$ svk delete --message "Deleting file 'yourfile'" //test/yourfile
Committed revision 15.

Here's an example of how to delete a file that has local mods:

$ svk delete over-there 
over-there is modified, use 'svk revert' first.
$ svk revert over-there 
Reverted over-there
$ svk delete over-there 
D   over-there

Here's an example of how to delete a file which was scheduled for addition but not yet committed:

$ svk delete new-file 
new-file is scheduled, use 'svk revert'.
$ svk revert new-file
Reverted new-file
$ rm new-file