How to Remove Deleted Ghost Files

By Eric Blake

A ghost file is a file that cannot be deleted by normal means. Users will typically receive an error similar to "cannot delete folder" or "cannot delete file". Usually, the problem with a ghost file is caused by system corruption, the system locking the ghost file, or a virus immediately recreating the ghost file once it is deleted. The solution usually requires the user to repair the system file structure, make a bootable dvd or find other means to access the ghost file before the system boots completely, or delete the virus in question.

Things You'll Need

  • Boot DVD (optional)

System Corruption

Step 1

Click on the "Start" button. Select "Run".

Step 2

Type "chkdsk /f [drive]:". Replace [drive] with the drive letter where the ghost file is.

Step 3

Select "OK".

Step 4

Wait for the Check Disk program to complete its scan. This may take some time, depending on how fast your computer is.

Step 5

Delete the desired ghost file.

Delete Locked Ghost Files Before Bootup

Step 1

Write down the location and name of the ghost file in question.

Step 2

Place your installation CD into the CD/DVD Rom drive. Restart your computer and boot from the installation CD. You may need to configure your computer to boot from the CD/DVD Rom drive first.

Step 3

Click on "Repair your computer" if you are running Windows 7 or Vista. Press "R" when the "welcome to Setup" screen appears if you are running Windows XP.

Step 4

Select the installation of Windows with the ghost file on it. For computers running XP, you may also need to enter the administrator password if there is one.

Step 5

Select "Command Prompt" for machines running Windows 7 or Vista. If you are running Windows XP, you should be given the command prompt automatically.

Step 6

Type in "cd [path]" into the command prompt, where [path] is the location you wrote down from Step 1. Hit enter.

Step 7

Type "del [ghost file]", where [ghost file] is the name of the ghost file in question. Reboot the computer.

Unlocking Files Using "msconfig"

Step 1

Hold down the Windows key and press "R". Type "msconfig" and hit the "enter" key.

Step 2

Select the tab labeled "Startup".

Step 3

Uncheck the boxes that correspond with any ghost files you are attempting to delete. Reboot the system.

Step 4

Delete the desired ghost file.

Unlocking Files Using "regedit"

Step 1

Hold down the Windows key and press "R". Type "regedit" and hit the "enter" key.

Step 2

Select "Yes" in the dialogue box titled "User Account Control" if present.

Step 3

Press Ctrl + F. Type in the name of the ghost file and hit "enter".

Step 4

Press F3 if the first search is not the exact name of the ghost file in question.

Step 5

Backup the registry entry by selecting "File", then "Export". Save the entry someplace easy to access and remember. This action will help protect your system if you prevent a critical file from loading.

Step 6

Press the delete button and confirm the deletion.

Step 7

Continue to scan for additional entries, repeating steps 4 through 6. Delete all occurrences of the file in question. Once this is completed, reboot the system and delete the desired ghost file.

Tips & Warnings

  • Use a virus scanner before attempting any of the methods above to delete a ghost file. Very often the problem can be solved with a virus scan alone.
  • Users may choose to use other software to scan and repair the file system. Checking the disk for errors is usually the best option to start with since it is the least invasive.
  • You may want to make a bootable dvd to delete the ghost file. This has the added benefit of avoiding the entire process of disabling locked files. You may need to run a program to cleanup your computer's boot process afterwards
  • Be very careful when using programs like msconfig or regedit. These programs can create a lot of problems if used incorrectly. Always consult an expert if needed. Be careful when deleting files. While a ghost file may be annoying, deleting a critical file can also cause your system to crash. Consult an expert if you are unsure. Do not stop the program "chkdsk" while it is running. Doing so can cause additional file corruption.