Take the 2-minute tour ×

We have a project that is stored within our TFS server and some files were Checked-Out by me from another computer and another user (both of which are not used anymore). Is there a way to force the unlocking of the file (no changes were made to it so it's safe to do so if I can only do it).


share|improve this question
add comment

8 Answers

up vote 8 down vote accepted

If you login into the source control with the admin account, you will be able to force undo checkout, or check in with any file you provide.

share|improve this answer
Sweet, now I only need to remember what is the admin acount :) –  David Brunelle Aug 10 '10 at 17:47
usually, it is admin, or administrator, without a pass. –  kurast Aug 10 '10 at 17:49
I hope not! –  Robaticus Aug 10 '10 at 18:27
Problem is, it usually is, because it is the default one. –  kurast Jan 11 '13 at 16:41
@Robaticus Your hopes have been dashed. –  Ryan Gates Jan 23 '13 at 21:31
show 1 more comment


You can get the tool here: http://www.attrice.info/cm/tfs/

share|improve this answer
best. tool. evar. –  Elan Hasson Jul 15 '12 at 15:28
For detailed steps see my answer below: stackoverflow.com/a/14565165/224976 –  Tim Partridge Jan 28 '13 at 15:20
add comment

I was able to undo another user's checkout with the following command:


You'll need to wrap that semicolon in double-quotes if you're running the command from PowerShell. We're running TFS 2010 (and VS 2010).

Disclaimer: I got this from the FCI-H blog at http://fci-h.blogspot.com/2011/01/how-to-force-undo-checkout-tfs.html

share|improve this answer
What does the {workspace} token need to be? –  PeterX Aug 12 '13 at 7:54
I am trying to follow it but some how I could not succeed. I would like to know that should user have right to undo other user locked settings or any tfs user can do that –  User1551892 Feb 26 at 10:04
add comment

Here's what I do in Visual Studio 2012

(Note: I have the TFS Power Tools installed so if you don't see the described options you may need to install them. http://visualstudiogallery.msdn.microsoft.com/b1ef7eb2-e084-4cb8-9bc7-06c3bad9148f )

If you are accessing the Source Control Explorer as a team project administrator (or at least someone with the "Undo other users' changes" access right) you can do the following in Visual Studio 2012 to clear a lock and checkout.

  1. From the Source Control Explorer find the folder containing the locked file(s).
  2. Right-click and select Find then Find by Status...
  3. The "Find in Source Control" window appears
  4. Click the Find button
  5. A "Find in Source Control" tab should appear showing the file(s) that are checked out
  6. Right click the file you want to unlock
  7. Select Undo... from the context menu
  8. A confirmation dialog appears. Click the Yes button.
  9. The file should disappear from the "Find in Source Control" window.

The file is now unlocked.

share|improve this answer
This worked great! –  user1334903 Dec 18 '13 at 4:43
add comment

Team Foundation Sidekicks has a Status sidekick that allows you to query for checked out work items. Once a work item is selected, click the "Undo lock" buttons on the toolbar.


Keep in mind that you will need the appropriate rights. The permissions are called "Undo other users' changes" and "Unlock other users' changes". These permissions can be viewed by:

  2. Select Properties
  3. Select the Security tab
  5. View the "Permissions for [user/group]:" section at the bottom

Screenshot of unlocking a file using Team Foundation Sidekicks

Disclaimer: this answer is an edited repost of Brett Roger's answer to a similar question.

share|improve this answer
add comment

Based on stackptr answer I've created batch file UnlockOther.bat

@rem from http://stackoverflow.com/questions/3451637/how-to-unlock-a-file-from-someone-else-in-team-foundation-server
@rem tf undo {file path} /workspace:{workspace};{username

@echo on
tf undo $/MyTfsProject/path/fileName.ext /workspace:CollegeMachine;CollegueName /login:MyLogin 
share|improve this answer
add comment

I solved this with the TFS powertools (dec 2011 - for VS 2010 TFS 2010)


Find in Source Control | Status... allows you to find all files checked out to a specific person

right click and UNDO... can remove each checkout.

share|improve this answer
add comment

Team Foundation Sidekicks worked fine for me.

The file didn't unlock so I did a undo on pending changes and after that I could delete the file.

share|improve this answer
add comment

Your Answer


