Can't delete .Trash-999 Folder


Recommended Posts

I had two directories which are .Trash-999.

 

I managed to delete the first one by adding my user in permissions with full control.

However the second folder is more troublesome. 

I've added myself to permissions again, unable to delete because of some "unknown error".

 

I've used Unlocker and Lockhunter, both fail to delete it.

 

If I dig into the directories, I can see and delete individual files but the directories themselves I sometimes can't delete. Even if I delete everything out of the directory. Some directories allow me to delete it, some cry it isn't empty, which it is (I've got show hidden files option ticked).

image.thumb.png.dadd335925a4d3d9a186ed7928bbda25.png

 

I read a previous trick here which said to move it to my C drive and call it Windows.old and run a disk cleanup. The problem is my C drive hasn't enough room to spare since this directory is over 270gb in size.

This is what happens when I try to delete the trash-999 directory:

 

image.thumb.png.c30f55e6b29adfcadf9770e83d8bb425.png

 

Any ideas?

 

For those wondering how I got in this state, here is a totally skippable back story.

 

I installed Windows 10 LTSB version. For whatever reason it did not like to play with my Onedrive directory on another drive. It kept saying all the files were corrupt. 

At a guess I would say that the Onedrive folder acts as some kind of symbolic link to somewhere. So my solution was to delete the onedrive folder and re-download all my files.

I couldn't delete the folder however, similar errors to this.

I loaded up a Linux ISO from USB and delete the files. Great. But being as smart as me, I didn't empty the trash after deletion. So when I rebooted I had this big fat trash directory.

Even booting back into Linux didn't work as the errors were similar. Unknown errors, couldn't find files etc.

 

I just want to reclaim my HD space back and I am lost on how I force a deletion of a directory. Surely there is a way to just nuke it?

Link to comment
Share on other sites

whenever i've run across a broken directory like that I just boot into a linux live cd/usb and delete the folder from there since linux just ignores the occasionally broken permission system of NTFS :)

Link to comment
Share on other sites

3 hours ago, Jim K said:

Does this thread help any?

 

 

I tried that thread first. Tried everything in it, still no dice. 

21 minutes ago, Brandon H said:

whenever i've run across a broken directory like that I just boot into a linux live cd/usb and delete the folder from there since linux just ignores the occasionally broken permission system of NTFS :)

As I mentioned, even booting into a live CD doesn't allow me to delete as it (can't show you the exact errors) brings up messages along the lines or unable to access files.

Link to comment
Share on other sites

7 minutes ago, »X« said:

I tried that thread first. Tried everything in it, still no dice. 

As I mentioned, even booting into a live CD doesn't allow me to delete as it (can't show you the exact errors) brings up messages along the lines or unable to access files.

even from terminal level? you should be able to ignore the errors and delete the directory with the following command

sudo rm -rf (directory path)

the -rf is 2 flags, recursive (gets any sub folders), and force (ignores all errors); and running with sudo gives the command max root permission

 

this command should work no matter what, it's basically a hard kill switch command for files when run as root lol.

 

https://ss64.com/bash/rm.html

Link to comment
Share on other sites

4 hours ago, Brandon H said:

even from terminal level? you should be able to ignore the errors and delete the directory with the following command


sudo rm -rf (directory path)

the -rf is 2 flags, recursive (gets any sub folders), and force (ignores all errors); and running with sudo gives the command max root permission

 

this command should work no matter what, it's basically a hard kill switch command for files when run as root lol.

 

https://ss64.com/bash/rm.html

Seems this directory is cursed.

 

I just tried that in an Ubuntu live USB.

 

I get the following:

 

rm: cannot remove 'files/OU/ESSAYS': Directory not empty

 

Even though everything I am reading is saying -rf should removed everything, empty or not, it's crying because it's not empty.

 

Any other nuke commands you are aware of?

 

Edit: Just to add.

Do I need to get someone to remove a curse from this drive?

Would a drill through it fix it?

 

The only way it seems I can delete this folder is to format the drive.

 

While in Ubuntu, I tried deleting the folder.

image.thumb.png.7518aaeb456ebc6f54aec7843689b3cd.png

 

 

If I go into the directory, I can seemingly delete the folders.

When I do, I get a new directory appear in the folder called expunged

 

If I delete those folders, then seem to not delete and rename themselves.

image.thumb.png.064a36cbf79eb74f46dadb0e4a1c70f5.png

 

 

Those "2"s are each attempt I hit delete.

 

 

Edited by »X«
Link to comment
Share on other sites

10 minutes ago, »X« said:

Seems this directory is cursed.

 

I just tried that in an Ubuntu live USB.

 

I get the following:

 

rm: cannot remove 'files/OU/ESSAYS': Directory not empty

 

Even though everything I am reading is saying -rf should removed everything, empty or not, it's crying because it's not empty.

 

Any other nuke commands you are aware of?

that was with using the -rf flags? that's very odd indeed.

 

there's the alternate command meant specifically for folders but there's no force flag on it which is why most recommend rm -r

 

https://ss64.com/bash/rmdir.html

 

if that doesn't work then the entry is likely corrupt in the actual partition table I would have to think. something similar happened to me several years back on an old Compaq, I ended up having to format to get rid of the entry :/

Link to comment
Share on other sites

tried a bit of googling and I found a couple things you could try. apparently it's not an unknown issue just requires different methods to fix depending

 

https://askubuntu.com/questions/566474/why-do-i-get-directory-not-empty-when-i-try-to-remove-an-empty-directory

 

a couple things suggested are renaming the directory then run the delete command or move it back to the trash/recycle bin again and empty it

 

----

 

on the Windows side you could try command line or powershell as well, opened as admin.

https://stackoverflow.com/questions/97875/rm-rf-equivalent-for-windows - has some interesting info you could try

 

Command Prompt:

Quote

How to delete a folder

 

Open the command prompt by typing “CMD” in the search field in the taskbar and clicking on “Command Prompt”. Navigate to the folder containing the folder to be deleted by using the ‘cd’ command. Type the following command in the command prompt:

 


RD /S /Q C:\Users\HP1\Documents\folder1

 

RD stands for remove directory.

/S causes the deletion of all subfolders and files

/Q will not show Y/N confirmation and will delete the files silently

 

Powershell:

Remove-Item "targetdirectory" -Recurse -Force

 

Link to comment
Share on other sites

Thanks.

 

I just tried it and it leads down another rabbit hole.

 

Reparse Points.

 

When I tried to delete the directory, I got this:

 

"ERROR_REPARSE_TAG_MISMATCH: There is a mismatch between the tag specified in the request and the tag present in the reparse point."

 

Onedrive sure did a number on this directory.

Link to comment
Share on other sites

Hello,

Have you run Chkdsk against the volume to verify there is no filesystem corruption?  Also, have you tried using TakeOwn to take ownership of the directory and everything inside it?

Regards,


Aryeh Goretsky

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.