Viewing the contents of a file geodatabase OR editing its contents using an Esri product, it doesn't matter which, will produce a .LOCK file inside the file GDB's folder on the file system which can be seen via Windows Explorer. It will contain some numbers in its filename, one of which refers to the process ID (PID) of the active process connecting to it. To know which process or application has your FGDB locked, open Task Manager and explore the contents of your GDB folder on the file system using Windows Explorer. Add the PID field to Task Manager and then compare the process IDs in Task Manager to that of the lock file to identify the culprit. The presence of the .LOCK file is essentially an exclusive lock and won't allow you to do much else other than view the FGDB contents until it is gone. Killing those connections can be done by ending the process brutally in Task Manager or gracefully closing an application or stopping a GIS service, if applicable.
Now, if there is no lock file or process holding on to the FGDB, then you probably have a system lock of some sort that hasn't cleared up. Rebooting should resolve that; but if rebooting isn't possible then you'll need to close the FGDB files manually. If you have Windows 7 or Server 2008 R2 or higher, read on:
If you are still having issues with deleting a geodatabase on the file system despite the fact that the .lock files no longer exist, it's possible there is still a process lock on one or more of the files within it. That being said, if you're using Windows Server 2008 / Windows 7 or later you can try one of the following methods:
From the Start menu, type FSMGMT.MSC, then multi-select the files you want from the GUI, then right click them and chose "Close". That method should force close the files that are technically still open due to a process lock.
From a batch file, run the following (example is for a file geodatabase) to close a file named a00000225.gdbtable (this filename is just an example):
for /f "skip=4 tokens=1,2*" %%a in ('net files') do if %%b == C:\this_server...\a00000225.gdbtable net file %%a /close
You can modify the command above to loop through all of the files in the file geodatabase to close them all rather than specify them individually, which would be tedious since there are so many.
From the command prompt, type NET FILES to see what the bold text above should contain.
Remember that double percent characters are required for batch files (in other words, %% rather than %) but single percent characters are used when running the command outside of a batch script.