# Database Locked - use force-unlock option

**URL:** <https://gramps.discourse.group/t/database-locked-use-force-unlock-option/7194>\
**Category:** dansk (Danish)\
**Tags:** data-recovery\
**Created:** [March 10, 2025, 10:59am UTC](https://gramps.discourse.group/t/database-locked-use-force-unlock-option/7194 "2025-03-10T10:59:01Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [April 7, 2025, 9:07pm UTC](https://gramps.discourse.group/t/database-locked-use-force-unlock-option/7194/16 "2025-04-07T21:07:52Z")

</div>

### Let’s do a manual lock break then.

_(To simulate your problem for screen captures, I just started gramps, loaded my “Example52” tree and killed the gramps task. This abnormal exit caused a Lock to be left behind.)_

Select your locked file in the Family Trees → [Manage Family Trees…](https://www.gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Manage_Family_Trees#Unlocking_a_Family_Tree) dialog and click the Info button:

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/c/c60e909122fc78f6afdefa82e11a89020aea24bb.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/9/94b82671fbfd48375386bb26b3d6da50a872c4d4.png)  
This will tell you the _ **exact** _ path to the database folder for that Tree. (My database path is very unusual because it is a testing box. The really important part is the final 8 characters because the folder has a “hexadecimal” filename that is hard to remember. In the Example52 tree example, the foldername is `64f6893a`) Navigate to that folder in your OS then leave the folder open but quit Gramps.

Delete the `lock` file (This screen capture is from the Files Manager in Fedora Linux. A macOS file manager will have a somewhat different appearance.)

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/6/69c774531214615c1efc35ef80d8f968b4580a5e.png)

Restarting Gramps should now allow the Tree to load.

### Once your tree loads again:

[Make a Backup](https://gramps-project.org/wiki/index.php/How_to_make_a_backup) immediately.

Then use the **Tools → Family Tree Repair → [Check and Repair Database](https://www.gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Tools#Check_and_Repair_Database)…** tool to fix any damage that might be related to the unexpected power-down.

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/9/94f5ce5e93fcf9ca8c0ccbbfda2e24a2516f5149.png)

---

_[View the full topic](https://gramps.discourse.group/t/database-locked-use-force-unlock-option/7194)._
