How to delete a font in Windows 7 that is still in use?
I installed a barcode font for a project. The font was installed thru the Fonts control panel. Now I would like to remove the font from my system but when I try to delete it it gives me a warning about the font being in use.
I've shut down all running applications but I still get the error message. Does anyone know of a way to determine what program is using the font? Is there a way to force deletion of the font?
Solution 1:
The best way to ensure that the font is not in use anymore is to try to remove it in Safe Mode.
You can get there by rebooting, pressing F8 before Windows boots and selecting it with the arrow keys...
Solution 2:
Unlocker is a brilliant free little application that can help you determine which application has a lock on a file. It also allows you to release the lock, or if it's the Windows itself, delete it on next reboot.
Solution 3:
10 second fix via elvated command prompt: Start > CMD > Run As Administrator:
del /f /s /q /a "C:\Windows\fonts\my-font.ttf"
That will force delete the file and that's it.
Solution 4:
If you want to use Unlocker as suggested by another answer, you may find it doesn't work in the Fonts folder. However, there is still a way to do this, through the command line.
Just run the following command:
C:\Program Files\Unlocker>Unlocker.exe C:\Windows\Fonts\Oswald-Regular.otf
Obviously use the Unlocker.exe from the installed location, and replace the specific fonts name with the one you want to delete.
Solution 5:
Previously, I recommended Unlocker. A less invasive and more advanced technique involves using Process Explorer. In Process Explorer:
- Under the Find menu, select Find Handle or DLL... (or press Ctrl+F)
- Type the filename of the font you wish to delete (not the font name; if you're unsure about the name of the file, locate the font in your fonts directory and view the file properties).
- Kill any processes using the file.
- If you killed
explorer.exe
, restart it by selecting Run... from the File menu (or press Ctrl+R) and enteringexplorer.exe
.
- If you killed
- Delete the file from an Exlorer window or through the command prompt.
Incidentally, this goes for deleting any non-system file that is in use and cannot be deleted on Windows—not just fonts.