Skip to Main Content
Version Control with Subversion, 2nd Edition
book

Version Control with Subversion, 2nd Edition

by C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick
September 2008
Intermediate to advanced content levelIntermediate to advanced
432 pages
13h 57m
English
O'Reilly Media, Inc.
Content preview from Version Control with Subversion, 2nd Edition

Name

svn delete — Delete an item from a working copy or the repository.

Synopsis

svn delete PATH...
svn delete URL...

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 unless the --keep-local option is given. The command will not remove any unversioned or modified items; use the --force option to override this behavior.

Items specified by URL are deleted from the repository via an immediate commit. Multiple URLs are committed atomically.

Alternate names

del, remove, rm.

Changes

Working copy if operating on files; repository if operating on URLs.

Accesses repository

Only if operating on URLs.

Options

--editor-cmd EDITOR
--encoding ENC
--file (-F) FILE
--force
--force-log
--keep-local
--message (-m) TEXT
--quiet (-q)
--targets FILENAME
--with-revprop ARG

Examples

Using svn to delete a file from your working copy deletes your local copy of the file, but it merely schedules the file to be deleted from the repository. When you commit, the file is deleted in the repository:

$ svn delete myfile
D         myfile

$ svn commit -m "Deleted file 'myfile'."
Deleting       myfile
Transmitting file data .
Committed revision 14.

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

$ svn delete -m "Deleting file 'yourfile'" \
             file:///var/svn/repos/test/yourfile

Committed revision 15.

Here’s an example of how to force deletion of a file that has local mods:

$ svn delete over-there ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Subversion Version Control: Using The Subversion Version Control System in Development Projects

Subversion Version Control: Using The Subversion Version Control System in Development Projects

William Nagel
Version Control with Git, 3rd Edition

Version Control with Git, 3rd Edition

Prem Kumar Ponuthorai, Jon Loeliger

Publisher Resources

ISBN: 9780596510336Errata Page