sharepoint

SharePoint File Checkout Problems

Resolution Checklist

  • 1 Understand SharePoint File Checkout Problems
  • 2 Override and Force Discard Checkouts (Web)
  • 3 Clear Client Office Upload Cache on Windows
  • 4 Clear Client Office Upload Cache on macOS
  • 5 PowerShell Commands to Audit and Discard Checkouts
  • 6 Summary Checklist for Checkout Problems

SharePoint File Checkout Problems

SharePoint’s Check-Out feature prevents version conflicts by locking a file to a single editor. However, this often causes issues when files are left checked out indefinitely by offline users, when application crashes prevent automatic check-in, or when the “Require Check Out” setting blocks real-time co-authoring.

This guide provides troubleshooting steps to release checkout locks, clear corrupt local application caches on Windows and macOS, and manage checkouts via PowerShell.


1. Understand SharePoint File Checkout Problems

File checkout issues are caused by configuration settings or orphaned client sessions:

  • Orphaned Local Checkout: A user checks out a file and edits it locally. If their laptop goes offline, their OneDrive client crashes, or they close the file without choosing “Check In,” the file remains locked in a checkout state on the server.
  • Required Check Out Library Rule: If “Require Check Out” is set to “Yes” in Document Library Settings, files cannot be edited in real-time co-authoring. Every user must check out the file, locking out all others.
  • Client Upload Cache Corruption: The Microsoft Office local database (OfficeFileCache) can fail to register that a file has been checked back in on the server, creating a local loop where the client believes the file is still locked.

2. Override and Force Discard Checkouts (Web)

If a user is out of the office and has left a file checked out, a SharePoint Site Owner or Administrator can force discard the checkout from the web portal.

[!WARNING] Force discarding a checkout will discard all changes made by the user since the file was checked out. If possible, verify if the user has unsaved local changes before proceeding.

  1. Navigate to the SharePoint document library via your web browser.
  2. Hover over the locked file, click the three vertical dots (Show Actions).
  3. Go to MoreDiscard checkout.
  4. Confirm by clicking Discard checkout in the pop-up warning dialog. The file will revert to its last checked-in version and unlock for other editors.

3. Clear Client Office Upload Cache on Windows

If the SharePoint web portal shows the file is unlocked, but your local Windows client still reports that the file is checked out or locked, clear the local Microsoft Office Cache.

Step 1: Force Close OneDrive and Office Apps

Run the following command in Command Prompt to terminate running sync processes:

taskkill /f /im OneDrive.exe /im winword.exe /im excel.exe /im powerpnt.exe /im MSOSYNC.EXE

Step 2: Delete the Office File Cache Directory

Run this command to purge the local Office document cache:

rmdir /s /q "%localappdata%\Microsoft\Office\16.0\OfficeFileCache"

Step 3: Clear Office Credentials

  1. Open the Start menu, type Credential Manager, and select it.
  2. Under Windows Credentials, locate all credentials starting with MicrosoftOffice16_Data:ADAL: or OneDrive.
  3. Click on them and select Remove.
  4. Relaunch OneDrive and Office applications.

4. Clear Client Office Upload Cache on macOS

On macOS, cached Microsoft Word, Excel, and PowerPoint containers can retain stale checkout states.

Step 1: Terminate Sync and Office Processes

Open Terminal and kill the desktop applications:

killall OneDrive
killall "Microsoft Word" "Microsoft Excel" "Microsoft PowerPoint"

Step 2: Purge macOS Office Containers and Caches

Execute these commands to clear the local application cache directories:

# Clear MS Office caches
rm -rf ~/Library/Containers/com.microsoft.Word/Data/Library/Caches
rm -rf ~/Library/Containers/com.microsoft.Excel/Data/Library/Caches
rm -rf ~/Library/Containers/com.microsoft.Powerpoint/Data/Library/Caches

# Purge Office persistent configuration states
rm -rf ~/Library/Containers/com.microsoft.Office365ServiceV2

5. PowerShell Commands to Audit and Discard Checkouts

Administrators can use PowerShell (compatible with both Windows and macOS via PowerShell Core) to identify and unlock checked-out files across a site collection.

Step 1: Install PnP PowerShell (Cross-Platform)

# Install the PnP PowerShell module
Install-Module -Name PnP.PowerShell -Scope CurrentUser -Force

Step 2: Identify and Undo Checkouts

Run this script to connect to your site, scan a library, and release checked-out files:

# Connect to the SharePoint site
Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/site-name" -Interactive

# Find all checked-out files in the "Shared Documents" library
$CheckedOutFiles = Get-PnPFolderItem -FolderSiteRelativeUrl "Shared Documents" -ItemType File | Where-Object { $_.CheckedOutByUser -ne $null }

# Display checked-out files
$CheckedOutFiles | Select-Object Name, ServerRelativeUrl, CheckedOutByUser

# FORCE DISCARD CHECKOUT for a specific file
Undo-PnPFileCheckout -Url "/sites/site-name/Shared Documents/ImportantFile.docx"

6. Summary Checklist for Checkout Problems

ComponentRoot CauseActionable Resolution
SharePoint Library Settings”Require Check Out” is activeDisable under Library SettingsVersioning settings.
Orphaned CheckoutUser left file lockedClick Discard Checkout from SharePoint Web.
Windows Client SyncStale local file stateDelete %localappdata%\Microsoft\Office\16.0\OfficeFileCache.
macOS Client SyncCorrupted container cachingRun killall OneDrive and clear ~/Library/Containers/com.microsoft.*.
Bulk AdministrationMany files lockedUse PnP PowerShell script (Undo-PnPFileCheckout) to release files in bulk.