Source Control

SVN could not execute cleanup command – TortoiseSVN

Your repository is locked due to some error during update or something.

You made a cleanup command or via GUI of TortoiseSVN and then you always get error as something like:

Previous operation has not finished; run 'cleanup' if it was interrupted
Please execute the 'Cleanup' command.

Then you can’t do anything even update, nor clean up.



You can find similar or the same issue on StackOverflow or something:

  • Working copy XXX locked and cleanup failed in SVN, here
  • Executing SVN Cleanup from command prompt, here

So among them, one solution that I always use for this kind of issue.


I would first to make sure that I could re-execute the clean-up, update or commit as normal so I use the method to clean the sqlite db (wc.db) of SVN that you can find it in the root of your local folder (.svn).

Following screen shows that the local sync. has been locked.


To remove the lock, we just need to delete the records of WC_LOCK and WC_QUEUE:

delete from WC_LOCK;
delete from WORK_QUEUE;

Next, above solution just about to re-enable commit, update or cleanup but you need to solve your real issue that causes you with this lock. As in my case, I have issue with a folder contains special character naming on files so for me, I just need to delete the folder from local and commit it to solve my problem.

You might have other issue, let’s raise here if I or some could help out.

One reply on “SVN could not execute cleanup command – TortoiseSVN”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.