Was this page helpful?
Thank you!

Comments or suggestions?

Enter Email Address (optional)

Error: File [company file name].lock is in use by another copy of QuickBooks

An error occurs when opening a QuickBooks for Mac company data file:

Error: "file [company file name].lock is in use by another copy of QuickBooks", followed by "document [company file name] cannot be opened.
Why this is happening

This can occur if the QuickBooks file was not opened completely in a previous attempt, which resulted in the .lock file being created but not automatically deleted.

How to fix it

The .lock file is hidden and cannot be seen using Finder or by navigating to the location. You must delete it using a command line application (Terminal):

  1. Close QuickBooks.
  2. Find and note the location of the company file. For example: /Users/[user name]/Documents/QuickBooks data/MyCompany.qb2007
  3. Open the Terminal application, typically found in /Applications/Utilities/Terminal.app.
  4. Use the Terminal application to navigate to the location of the company file using the cd command. For example, enter cd '/Users/[user name]/Documents/QuickBooks data/' and press Enter.

    Note: Use single quotes around the entire path as shown in the example so that any spaces in the folder names are interpreted as part of the path.
  5. Enter ls -a in the Terminal window and press Enter. The Terminal application displays a list of all files in the folder.
  6. Find the file with the same name as the QuickBooks company file and a .lock file extension and note its name. For example, MyCompany.qb2007.lock
  7. Use the rm command to remove the .lock file and press Enter. Substitute the name of your company file in the example:
rm '.MyCompany.qb2007.lock'

Important: Make sure you include the period at the beginning of the file name, otherwise you will not delete the file. 

  1. Confirm that the .lock file was removed:
    1. Enter ls -a and press Enter.
    2. Look through the list of files and verify that the .lock file does not appear.
  2. Close the Terminal application, open QuickBooks, and open the company file.
KB ID# SLN40079
4/26/2017 2:21:26 PM
QYPPRDQBKSWS09 9138 Pro 2017 b82eb1