Most of the time, when you right-click on the USB flash drive, the drop-down menu will have a delete option, and when you click on it, it will automatically move your files to the **site. But in some cases, this will not work due to various issues ranging from write protection to physical damage of the USB flash drive. We have researched and followed 10 ways to delete files when you are unable to delete them from USB flash drive. We've also highlighted the data recovery tool when you mistakenly delete files and empty your site.
Restart your computer and try another computer
Restarting your computer can fix most hardware issues. So, the first step to fix the "Unable to delete files from USB flash drive" issue is to restart your computer. If that doesn't work, try the drive on another computer and see if the problem persists.
Computer virus and malware scanning
If you have any virus or malware on your computer, it may cause you to be unable to delete files from the USB flash drive. In this case, you can perform a virus scan to fix it.
1. Type and search for "virus" in the search box next to the "Start" icon.
2. Launch Virus & Threat Protection and select the Scan option.
3. Select one of the scanning options to start the virus scan.
Reformat the USB flash drive
If the file system of the USB flash drive is not compatible with the operating system you are using, you may not be able to delete files from the USB flash drive. If this is the problem, you can reformat the USB flash drive to fix the problem. To use a USB flash drive on Windows and Mac at the same time, it is recommended to reformat the USB flash drive to FAT, FAT32 or EXFAT.
Delete the write protection of the USB flash drive.
Your USB drive is write-protected, which means you can't format your flash drive, and your files are read-only, so they can't be deleted. To remove write protection, go to the USB flash drive under your computer's File Explorer. Select the property, right-click and uncheck Read-only, and then click Apply.
Also, check if your USB flash drive has a switch and make sure to turn it on, as this is another way to write protect files.
Use the Windows Command Prompt to delete the files
Search for the Command Prompt, which you can do by going to the Start menu and searching for cmd. Right-click at the command prompt and select Run as administrator.
When the window appears, use this command line del file path, for example: del f"d:\onedrive\videos\file to delete.txt", and then click Enter. The command will be executed, located in the files to delete folder in the videos folderThe txt file will be deleted.
Use the diskpart utility to clear the read-only attributes
1. Go to the start menu and search for cmd to launch the command prompt. Type diskpartexe and press enter.
2. Type and enter the "list disk" command. All of your drives will be listed here.
3. To select a specific disk, run the command select disk, where is the number displayed next to the disk in the figure below, here run the command select disk 1.
4. To view the attributes of disk 1, type the attributes disk command.
5. To remove read-only attributes, type attributes disk clear readonly.
Check that every folder or file on the USB flash drive is not set to read-only
This can also be a problem, as some folders and files may be set to read-only, resulting in files that cannot be deleted. Sometimes, when you do a system upgrade, all documents can be changed to read-only. Also, if one file is set to read-only, you'll delete the folder that contains the read-only file.
1. Another way to solve this problem is to remove write protection from the registry editor. Press the Win+R keys on your keyboard to open the run, and then type "regedit".
Go to the following path:
computer\hkey_local_machine\system\currentcontrolset\control\storagedevicepolicies2. Then double-click WriteProtect. Change the value data from 1 to 0.
3. Restart the computer and reconnect the USB flash drive to access the files without read-only attributes.
Use Safe Mode to unlock and delete files.
To unlock and delete files using Safe Mode, restart your computer and press F8 on your keyboard when your computer starts up until the boot menu appears. Select the safe mode and a window will pop up. Open File Explorer, browse for a folder or file location, and delete.
1. To unlock and delete files with Safe Mode in Windows 10, click "Start", go to Settings, then select "Update & Security", select "Recover", and then click "Reboot Now" (located under "Advanced Boot") to enter the Windows 10 recovery environment.
2. Select Troubleshooter, then select Advanced Options >> Startup Settings, and then click Restart.
3. You can now delete or unlock your files in Safe Mode.
Use Check Disk Utility to repair USB flash drive
USB flash drive not deleting files is most likely caused by corrupted or unreadable files. To confirm if this is the problem, run the disk check utility and proceed to delete files from the USB flash drive. To do this, go to your computer and select the USB flash drive. Right-click on it and select "Properties". In the dialog box that appears, select Check under the Tools tab. This option will run and check the USB flash drive for errors. When it's done, you'll see a pop-up window showing the error in the USB stick. Go ahead and click on the Repair Drive option to get rid of any errors in the USB flash drive.
As mentioned earlier, also check your USB flash drive to confirm if the write protection button is on or off.
Get permissions from Windows Explorer
To get permissions from Windows, right-click on the folder or file. Select Properties from the drop-down menu and click the Security tab.
From there, a window will pop up》Select "Advanced" in the bottom right corner>> click "Owner", then click "Edit>>", select "Administrator", then check "Replace owner of subcontainers and objects", and then "Apply". When you're done, select OK on everything.