diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 8b90a0a7371bab384d5bd37d3c0f713c24436da0..e8b3842ae56bd758fa67d89135b90cfddedeecf5 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1615,9 +1615,9 @@ void LLTextureCache::purgeAllTextures(bool purge_directories)
 				gDirUtilp->deleteFilesInDir(dirname, mask);
 			}
 		}
+		gDirUtilp->deleteFilesInDir(mTexturesDirName, mask); // headers, fast cache
 		if (purge_directories)
 		{
-			gDirUtilp->deleteFilesInDir(mTexturesDirName, mask);
 			LLFile::rmdir(mTexturesDirName);
 		}
 	}