Force to Delete Folder of MikTex on Windows 10

My TeXstudio could not handle KaiTi fonts, so I installed CTeX to try to fix it. Unfortunately, that broke my LaTeX setup completely. Reinstalling required uninstalling MiKTeX first, but the uninstall process could not finish cleanly.

First, I used Hardwipe. It removed almost everything, but a few empty folders were left behind. Because of those remaining folders, MiKTeX still could not be installed again.

Finally, I used Unlocker to remove the empty folders. Although Windows would not delete them immediately, Unlocker scheduled them to be deleted at the next boot.

After a reboot, the folders disappeared, and I was able to reinstall MiKTeX and TeXstudio successfully.

Table of Contents

Practical Steps

  1. Uninstall MiKTeX from Windows if the normal uninstaller still works.
  2. Check whether the old MiKTeX installation folder remains.
  3. If Windows refuses to delete the folder, use a file unlock/removal tool such as Unlocker.
  4. Choose the option to delete the folder on reboot.
  5. Restart Windows.
  6. Install MiKTeX again, then reinstall or reconfigure TeXstudio.

Before reinstalling, it is also worth checking whether any TeX-related processes are still running in Task Manager, such as MiKTeX Console, TeXstudio, or background package manager processes. Closing them first may make manual deletion possible without extra tools.

Leave a Reply