If your Windows C: drive is suddenly running out of space, a hidden database log file might be the culprit. Users often discover a file named capabilityaccessmanager.db-wal ballooning to massive sizes—sometimes consuming tens of gigabytes of precious storage space.
This Write-Ahead Log (WAL) belongs to the Windows Capability Access Manager, a service that handles app permissions (like camera and microphone access). Because this database file is locked by the active Windows service, you can't just right-click and delete it. You will be hit with a "File in Use" error.
To reclaim your storage, you need to disable the service, take ownership of the folder, and delete the log file. Here are the two best ways to do it, followed by a permanent fix to stop it from happening again.
Method 1: The Standard GUI Solution
This is the most straightforward method. It involves temporarily disabling the service through the Windows interface so you can safely delete the bloated file.
1. Temporarily Stop the Service
Press Windows Key + R, type services.msc, and press Enter. Scroll down to find the Capability Access Manager Service. Right-click it, select Stop, and then select Properties. Change the Startup type to Disabled, click Apply, and hit OK.
2. Navigate & Take Ownership
- Open File Explorer and go to
C:\ProgramData\Microsoft\Windows\CapabilityAccessManager. - Right-click the CapabilityAccessManager folder, choose Properties, and go to the Security tab. Click Advanced.
- Next to "Owner", click Change, type
Administrators, click Check Names, and then click OK. - Check the box that says Replace owner on subcontainers and objects, then click Apply and OK.
- Back on the Security tab, click Edit, select Administrators, tick Full control, click Apply, and click OK.
3. Delete the Giant File
Do not delete the standard .db file. Inside the folder, you will see capabilityaccessmanager.db-wal (along with a .db file). Delete the massive .db-wal file. It is best to leave the standard .db file intact so Windows can seamlessly rebuild the service.
4. Restore the Service
Go back to services.msc, right-click Capability Access Manager Service, and change its Startup type back to Automatic. Click Start to run the service, and then Restart your PC.
Method 2: The Command Prompt Solution (Safe Mode)
If the first method gives you an error saying the service is "stopping or starting please try again later," you will need to use the Command Prompt. Note: The order of operations here is critical—you must take ownership of the folder before stopping the service to bypass the error.
First, start Windows in Safe Mode: Restart your PC while holding the Shift key, then choose Troubleshoot > Advanced options > Startup Settings > Restart.
Once in Safe Mode, follow these steps:
1. Open Command Prompt as Administrator
2. Take ownership of the folder
takeown /f "C:\ProgramData\Microsoft\Windows\CapabilityAccessManager" /r /d y3. Stop the Capability Access Manager service
net stop camsvc4. Grant administrator permissions
icacls "C:\ProgramData\Microsoft\Windows\CapabilityAccessManager" /grant administrators:F /t5. Delete ONLY the large WAL log file
del "C:\ProgramData\Microsoft\Windows\CapabilityAccessManager\*.db-wal"6. Restart your computer normally.
How to Prevent the File From Growing Back
Deleting the file solves the immediate storage crisis, but you need to stop the root cause to prevent it from returning.
Users on the Microsoft Learn forums have identified that aggressive network management software or OEM bloatware—most notably the Dell SmartByte application—is a primary trigger for this incessant logging loop.
Recommendation: If your
.db-walfile begins bloating again rapidly after you delete it, navigate to Settings > Apps > Installed apps and uninstall Dell SmartByte (or similar OEM network optimizer applications). Once removed, the logging loop will break, and your storage space will remain safe.