16

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?

1

13 Answers 13

7

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...

3
  • 2
    Even in Safe Mode, Windows claims my font is in use :/ What to do?
    – powerbuoy
    Aug 19, 2014 at 18:19
  • @powerbuoy: Use Sysinternals Process Monitor and do a boot log, then look for your font name in that log; this should indicate which process opens the file, after which you can do attempts at avoiding that process from loading in Safe Mode with Sysinternals AutoRuns or so. Sep 7, 2014 at 14:41
  • 1
    @powerbuoy try Safe Mode Command Prompt mode, which is different from straight Safe Mode, courtesy of superuser.com/a/516022/16966 Jan 4, 2016 at 19:15
5

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.

5
  • 3
    Unlocker is an awesome tool, but unfortunately does not work in the Fonts folder.
    – fitojb
    Oct 3, 2012 at 5:14
  • 1
    @user2552310 says (in suggested edit) that this installs 3x bloatware, even after declining the installs.
    – Olli
    Feb 24, 2014 at 16:39
  • Chrome won't even allow me to download this claiming it's "malicious" :/
    – powerbuoy
    Aug 19, 2014 at 18:18
  • Unlocker has a portable version that doesn't install anything at all.
    – krispy
    Jan 29, 2015 at 5:04
  • 1
    While this solution works, I'd like to once again advise against it in favor of the accepted answer (Safe mode) or ending processes that hold a lock to the file. Forcefully removing file locks is extremely dangerous as you risk corrupting other locked files when the pointer is reset. Jan 29, 2015 at 10:23
4

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.

1
  • 5
    I tried this in Windows 7, still "access denied" Sep 22, 2016 at 15:11
3

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.

3

Previously, I recommended Unlocker. A less invasive and more advanced technique involves using Process Explorer. In Process Explorer:

  1. Under the Find menu, select Find Handle or DLL... (or press Ctrl+F)
  2. 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).
  3. 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 entering explorer.exe.
  4. 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.

1

I found another way to do this ... and it's actually Microsoft's Font utility which we are using to delete the font, it turns out, that is using the font we are trying to delete!

In the Fonts folder ... click Organize ... Layout ... uncheck Details pane

Now try and delete the font again, it should work.

That's Windows for you! :)

1

7 Tools to Unlock Those Hard to Delete Files • Raymond.CC

According to this review, IObit Unlocker is the recommended choice:

The file was successfully deleted WITHOUT needing a reboot or using Forced mode! What’s more, IObit was able to easily delete the whole folder full of these protected files, where most tools here couldn’t even delete just the single file.

Install

chocoinstallio-unlocker

Remove font

You can't select fonts with the GUI, but IObitUnlocker.exe also supports command-line usage.

pushd "%ProgramFiles(x86)%\IObit\IObit Unlocker"
IObitUnlocker.exe /Delete "C:\Windows\Fonts\Montserrat-Hairline.otf"

IObit Unlocker command line usage

IObitUnlocker.exe Command [Option] Object

Command:  
/None
/Delete
/Rename
/Move
/Copy

Option:
/Normal
/Advanced

Object:
None: "Path1","Path2","Path3"
Delete: "Path1","Path2","Path3"
Rename: "Path1","Path2","Path3" "NewName1","NewName2","NewName3"
Move:   "Path1","Path2","Path3" "NewPath"
Copy:   "Path1","Path2","Path3" "NewPath"
0

I just deleted it from an elevated command prompt (i.e. run as administrator). then went back to the fonts folder and deleted one more time and it was gone.

0

This worked for me, and it is very easy :

1- Use Unlocker just like Paul suggested

2- To delete the font, you can't use Unlocker in the fonts folder directly, the trick is to go a folder back (Windows Folder) and make a search for (*.ttf) the result will all the fonts of your system, but this time it is not in the "fonts folder", so you can use Unlocker, and delete what ever font you want, good luck

0

I realize that this is an old question but it might be useful to others, just like it has been with me just now. Not for the faint of heart. Backup your registry first before you do this. Go to the registry editor then find your font in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts then right-click and choose Delete. If you are running 64-bit, you might need to delete the same from this location: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Fonts Then restart.

0

In my case a font file was locked by the system process (Pid=4). So I renamed the file and did a reboot, then file could be deleted.

0

I unzipped a font on another hard drive that I'm having a hard time deleting and getting the "in use" error. I can delete in my initial drive, but not in the other. I wanted to delete the font without using any programs. I accidentally selected another item (folder) when I pressed delete, lo and behold it worked! I just restored the folder in the recycle bin and finally got rid of the pesky font. I hope this would be an easier alternate method for everyone.

0

This is because the font is "open" in the Windows "Preview Pane" on the right.

The only way to get around this is to disable the Preview Pane in Explorer by going to View->Details Pane (un-select Preview Pane).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .