whatfileis.pro
Paste a filename and find out what it is, whether it is safe, and what opens it.

What Is a .~lock File?

LibreOffice left a .~lock file and now warns the document is “locked for editing”. It is just a lock marker. Here is what it does and how to clear a stale one.

Category
Safe to delete?
Opens with

What a .~lock file is

A .~lock file is a lock file LibreOffice (and OpenOffice) creates the moment you open a document. Its full name is .~lock.<filename># — for example .~lock.Report.odt# — and it sits in the same folder as the document. Because the name starts with a dot it is hidden on Linux and macOS.

Why it exists

The lock file tells any other LibreOffice session that the document is already open, so two windows or two people can't overwrite each other's edits. It stores the user name, host and a timestamp. When you close the document normally, LibreOffice deletes the .~lock file automatically.

“Document is locked for editing”

If you see “Document is locked for editing by another user” but nobody else has it open, a stale .~lock was left behind after a crash or a force-quit. The document itself is fine.

Is it safe to delete?

Yes — when the document is closed everywhere. Close LibreOffice on every machine that might hold the file, then delete the orphaned .~lock.<name># file. The next time you open the document a fresh lock is created.

How to handle it by OS

Linux / macOS: the file is hidden; show hidden files (Ctrl+H in most file managers, or ls -a) to see and remove it.

Windows: LibreOffice uses the same lock files; they appear as .~lock.name# next to the document and can be deleted once the app is closed.

Common problem

A network share or cloud-sync folder can keep a lock alive after a crash. If the warning persists, make sure no sync client still has the file open, then delete the lock.

FAQ

What is a .~lock file in LibreOffice?

It is a hidden lock file LibreOffice creates while a document is open, to stop two sessions editing the same file at once.

Is it safe to delete a .~lock file?

Yes, once the document is closed everywhere. Deleting an orphaned lock clears the 'locked for editing' warning.

Why does it say the document is locked when no one has it open?

A stale .~lock was left after a crash. Close LibreOffice on all machines and delete the leftover lock file.

Where is the .~lock file stored?

In the same folder as the document, named .~lock.<filename>#, hidden because the name starts with a dot.

Will deleting the lock file damage my document?

No. The lock file contains no document data — only who has it open. Your .odt or .docx is untouched.

Other file types explained