How to Remove Deleted Ghost Files

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Ghost files can be a pain to delete.

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.

Advertisement

System Corruption

Video of the Day

Step 1

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

Video of the Day

Step 2

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

Advertisement

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.

Advertisement

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.

Advertisement

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.

Advertisement

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.

Advertisement

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.

Advertisement

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.

Advertisement

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.

Advertisement

Step 4

Delete the desired ghost file.

Advertisement

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.

Advertisement

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.

Advertisement

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.

Advertisement

Advertisement

references & resources