System Font Cache folder growing bigger in Terminal Server


I'm having some issues with my System Font Cache that is keep on growing bigger in all of my Terminal Server (Windows Server 2008 R2 RDSH). What could be the issue ? here ?

Example of the files that was cleaned up by CCleaner is below:


Open in new window

the files in that C:\Windows\ServiceProfiles\LocalService\AppData\Local\ directory has accumulated up to 2-3 GB per Terminal server thus eating up C:\ drive

how to stop it growing ?

LVL 11
Senior IT System EngineerIT ProfessionalAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The reason this can become  a problem s because a “FontCache”  .dat file is created for each unique user so If you have hundreds of unique users, over time the space on the C: drive begins to fill up,  these dat files are being created by the standard “Windows Font Cache Service,”  and can be deleted manually occasionally using a disc cleanup script as dome fonts  they are often locked by the system,  Windows  will recreate them at the next reboot. or set up a Scheduled Task to do it for you here's one
Automated Disk Cleanup

How to Rebuild a Font Cache
You can't.. We ran into the exact same problem

We ended up putting in a startup script that automatically cleans that folder out at boot time.   Dirt simple, and you never have to worry about it again.  

Simple 1 liner for powershell:

get-childitem -path $env:systemroot\ServiceProfiles\LocalService\AppData\Local -filter font*.dat | remove-object

Open in new window

Senior IT System EngineerIT ProfessionalAuthor Commented:
Yes, that's bit annoying that the files didn't get deleted automatically.

At the moment I'm manually deleting it using CCleaner64.exe when the disk space in the Production Terminal server is running critically low.

What's the issue here that triggers the growth ?
They just never get deleted.  And as they use the applications that load the fonts, it gets written to the cache file.  


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.