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
https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/
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 :)

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.

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

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«
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 :/

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

 

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.

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

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

    • No registered users viewing this page.
  • Posts

    • Those are some popular multiplayer games. But hardly "all". Just those that don't work on Linux currently due to specific anti-cheat implementations. I think it's also fair to point out the literally thousands of games that don't work on the PS5. And it's not locked at 1080p. That's the default, which you can change.
    • Ubuntu Livepatch arrives on Arm64 to eliminate system reboots for kernel updates by Paul Hill Canonical has just announced that its Livepatch service now supports computers with Arm64 processors. For those who are not familiar, Livepatch allows users to apply important kernel updates without any service interruption or rebooting. While home users will benefit from this, it’s even more important for critical machines that absolutely should not be going offline at all. The feature is available as part of Ubuntu Core 26 for Arm64 and Ubuntu Core 20 and onwards for AMD64. According to Canonical, this will improve the security of systems that aren’t security-maintained daily or weekly, and it helps organizations work towards Cyber Resilience Act (CRA) compliance. If you are familiar with Ubuntu, you probably know that most packages can be updated without having to restart the system. There is one big exception to this, and that’s the kernel; it typically requires you to reload the system to boot into the new kernel. With Livepatch, Canonical has done something so that you don’t need to restart to begin using the new kernel. Aside from Ubuntu Core 26, users with Arm64 chips running Ubuntu 26.04 LTS can also use Livepatch. If you want to learn more about Livepatch, check out its product page. There, you can also find a button to join Ubuntu Pro (it’s free for several home devices) so that you can enable Livepatch. By linking your computer to Ubuntu Pro, you will also extend the life of your Ubuntu install from five years to ten years. If you are running Ubuntu, let us know in the comments if you have been looking forward to this feature on your ARM-based computer. If you’ve had a compatible AMD64 machine for a while and never used this feature, let us know why in the comments!
    • Meta announces a major leadership change at WhatsApp by Pradeep Viswanathan Meta has announced a major leadership change at WhatsApp, with Will Cathcart stepping down after seven years of leading the world's largest messaging platform. CRED CEO and founder Kunal Shah will take over as the next global head of WhatsApp. CRED is an Indian fintech company focused on creditworthy consumers. As part of the transition, Meta is also making a minority investment in CRED through its Series H funding round. Meta CEO Mark Zuckerberg said Will Cathcart will remain at Meta and move into a new role focused on building new products from the ground up. Cathcart led WhatsApp during a major growth phase, helping the app reach more than 3 billion users worldwide. He also played a key role in expanding WhatsApp’s business offerings while keeping privacy and end-to-end encryption central to the product. Meta’s Chief Product Officer, Chris Cox, said Kunal Shah was selected after a search for a leader who understands WhatsApp’s global scale and future potential. In a leaked internal memo, Cox described Shah as a “serial founder” and one of India’s most respected entrepreneurs, adding that he brings “entrepreneurial energy” and a strong product mindset to the role. As part of the Series H funding round, CRED is raising ₹8,550 crore, or about $900 million, in a round led by Meta. The funding values CRED at ₹43,239 crore, or about $4.5 billion, on a post-money basis. It is important to note that this investment will not give Meta access to CRED customer information. Kunal posted the following on X regarding his new role at Meta: Although Kunal Shah will be stepping away from his operating role as CRED CEO, he will retain his personal shareholding in the company.
    • It wouldn't be hard for me to turn off my TV, if I had one. For one thing, I never scroll Instagram. The only reason I have an account is because Meta created one when it merged the account systems for its various services.
  • Recent Achievements

    • One Month Later
      nates earned a badge
      One Month Later
    • Week One Done
      Almohandis earned a badge
      Week One Done
    • Rookie
      dorf went up a rank
      Rookie
    • First Post
      mike_rumble earned a badge
      First Post
    • Dedicated
      tuben earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      504
    2. 2
      +Edouard
      207
    3. 3
      PsYcHoKiLLa
      98
    4. 4
      Michael Scrip
      89
    5. 5
      neufuse
      71
  • Tell a friend

    Love Neowin? Tell a friend!