Accepted answer

i tried recursively deleting all lock files, but that just resulted the error "path is not a working copy". i ended up having to do team->disconnect and then team->share. upon reconnect, it complained about existing .svn files, which it deleted. now it seems to be working.


i spent hours looking for a solution to the "attempted to lock an already-locked dir" error i was receiving in ibm rad. finally, i guessed to type:

unlock <directory path>

in the rad console and... volia i could finally syncronize my files!!


go to the metadata directory as below

your workspace>projectname>.metadata

inside this metada directory, there will be a lock file. delete this lock file.

restart eclipse and rebuild project. it worked for me !


subversion supports a command named "cleanup"; it is used to release the locks on a projectenter image description here


i solved a similar problem. svn client gave me an error:

"svn: e200002: failed to create new lock."

i tried everything including "cleanup" and "still lock" but with no success. then i solved the problem simply, i went to my svn server and deleted the locks folder:

at "c:/svn/my_repository/locks"

it turned out that there are broken files in it.


refresh/cleanup did not work for me. what worked:

1) file -> switch workspace - choose a different workspace
2) afterwards switch back to the original workspace


we don't have an external svn server. i was working on a pc with windows 7 enterprise, and i was using eclipse subversion plugin as an svn client. the problem in my case occurred when the commit of a file took to much time due to network problem that forced me to restart my pc.

after the restart i started getting this error: xxx file already locked.

the solution was to install (tortoisesvn), right click on the svn project folder --> tortoisesvn --> cleanup.

i hope that this post would be a help to someone.


use tortoise svn to cleanup with 'break write locks' option checked


svn help unlock

and find locker after all - lock isn't needed in most cases


i have faced same problem. i solved this by right click on project --->team----> refresh/cleanup


old question, but none of the above solutions worked for me. what did work was to close eclipse, then using tortoise, right click on the project in windows explorer and choose 'tortoisesvn' -> 'clean up', then just use the default checkboxed items (clean up working copy status, include externals), then hit ok.

this cleaned up the folder, then i was able to update and commit files as normal.


using svn 1.8, deleting lock file does not help (lock file does not exists).

refresh/cleanup did not solve either.

what did solve:

1) backup your directory, just incase...
2) team... disconnect. choose to remove .svn files
3) add it again to svn.

note: in my case, error was due to loss of network connection during initial commit.


we had the same repeating problem. it's a disaster. what can you do if cleanup and unlock does not help because there is no existing lock?

  1. search the hidden .svn folder in your directory structure. it contains a wc.db file which is an sql lite file.
  2. open it with an sql client, e.g. dbeaver. add an sql lite connection to the dbeaver by selecting the wc.db file.
  3. open the wc_lock table. you can see one or more rows that contains the url which was mentioned in the phantom lock error window.
  4. delete these rows from the table.
  5. try to update your project from the repo.
  6. if you use more than 1 repo in 1 project (externals) another phantom lock may appear during the update. in this case repeat the process with that folder.


after the same problem with "phantom lock" the only solution was:

1) disconnect the project eclipse->team->disconnect (select option to delete .svn folder)

2) than "reconnect" eclipse->team->svn->share project. ignore the warning about better do an checkout. after this all worked fine.

cleanup and restart was no solutions, also scan locks did not show anything.


just right click on project

  1. click on team

  2. click refresh/cleaup

this will remove all the current lock files created by svn

hope this will help !!!!


i solved this problem by doing these:

  1. right click on your project.

  2. click on team

  3. click refresh/cleaup


i get this too. i go to the directory (not in eclipse) where the files are, go into the .svn dir and delete the file called lock.

flip back to eclipse and continue.

there is a similar question here problems committing file to svn repository


error : attempted to lock an already-locked dir svn: working copy 'c:\work\myproject\workspaces\hpdp' locked.

solution: worked for me.

        right-click on project-->team-->refresh/cleanup


i tried all suggestion from this thread but the only one that worked is:

  1. go to the folder on which the project locked folder is stored
  2. execute svn cleanup


i had similar problem. team->refresh/cleanup solved my problem

Related Query

More Query from same tag