How to delete a font in Windows 7 that is still in use?

16

2

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?

John S

Posted 2010-07-23T14:46:33.237

Reputation: 593

Safe Mode and Unlocker didn't work for me, I did find a solution that did though, open font folder via UNC path: http://superuser.com/questions/264072/cant-remove-certain-fonts-in-win7

– matt wilkie – 2011-03-29T18:53:15.903

Answers

6

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

Tamara Wijsman

Posted 2010-07-23T14:46:33.237

Reputation: 54 163

2Even in Safe Mode, Windows claims my font is in use :/ What to do? – powerbuoy – 2014-08-19T18:19:05.690

@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. – Tamara Wijsman – 2014-09-07T14:41:00.467

1

@powerbuoy try Safe Mode Command Prompt mode, which is different from straight Safe Mode, courtesy of http://superuser.com/a/516022/16966

– matt wilkie – 2016-01-04T19:15:17.610

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.

Paul Lammertsma

Posted 2010-07-23T14:46:33.237

Reputation: 3 508

Chrome won't even allow me to download this claiming it's "malicious" :/ – powerbuoy – 2014-08-19T18:18:25.647

Unlocker has a portable version that doesn't install anything at all.

– krispy – 2015-01-29T05:04:42.427

1While 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. – Paul Lammertsma – 2015-01-29T10:23:43.787

3Unlocker is an awesome tool, but unfortunately does not work in the Fonts folder. – fitojb – 2012-10-03T05:14:53.607

1@user2552310 says (in suggested edit) that this installs 3x bloatware, even after declining the installs. – Olli – 2014-02-24T16:39:29.347

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.

Mike Averto

Posted 2010-07-23T14:46:33.237

Reputation: 157

4I tried this in Windows 7, still "access denied" – Max Kielland – 2016-09-22T15:11:50.687

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.

Bob

Posted 2010-07-23T14:46:33.237

Reputation: 243

2

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.

Paul Lammertsma

Posted 2010-07-23T14:46:33.237

Reputation: 3 508

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! :)

Mudit Saxena

Posted 2010-07-23T14:46:33.237

Reputation: 11

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.

Ace Miel

Posted 2010-07-23T14:46:33.237

Reputation: 1

0

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"

Leeroy

Posted 2010-07-23T14:46:33.237

Reputation: 185

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.

Noldi

Posted 2010-07-23T14:46:33.237

Reputation: 1

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.

ani

Posted 2010-07-23T14:46:33.237

Reputation: 1

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

Brian Brown PhD

Posted 2010-07-23T14:46:33.237

Reputation: 1

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

Carter Nolan

Posted 2010-07-23T14:46:33.237

Reputation: 101

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.

jeff Allen

Posted 2010-07-23T14:46:33.237

Reputation: 1