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

    • If they don't sell enough of the 1st gen then there won't be a 2nd gen
    • Epic fail, should've added an eSata port on the back, also if the memory/NVME are soldered then they're hardly gonna sell any, first thing most people do with their Steamdeck is, or used to be, replacing the NVME with a 2TB one.
    • GEEKOM kicks off Prime Day Sale with discounts up to 30% on Intel and AMD mini PCs by Steven Parker GEEKOM has kicked off its Prime Day Sale letting you save up to 30% on mini PCs in every price class. Below we are sharing a few highlights from the A series of AMD mini PCs, along with an Intel variant with pretty beefy specs. We start off with the very affordable GEEKOM A5 in the AMD Ryzen 5 7430U, 16GB RAM, and 512GB NVMe SSD configuration, with some of its highlighted specs listed below: Operating System: Windows 11 Pro CPU Model: AMD Ryzen 5 7430U CPU Speed: 3.5 GHz Cache Size: 16 MB Graphics: Integrated AMD Radeon Vega 7 Graphics Memory: 16 GB 3200 MT/s DDR4 Copilot+ PC: No SSD: 512 GB Connectivity: Bluetooth 5.2 + WiFi 6E I never got the chance to review this variant, but here is how GEEKOM describes it: GEEKOM A5 [Ryzen 5 7430U, 16GB+512GB] for $371 —was $439 (15% off) Next up is the GEEKOM A6 in the AMD Ryzen 7 6800H, 16GB DDR5 RAM, with a 1TB PCIe 4.0 NVMe SSD configuration, with the below highlights: Operating System: Windows 11 Pro CPU Model: AMD Ryzen 7 6800H CPU Speed: 4.7 GHz Cache Size: 16 MB Graphics: Integrated AMD Radeon 680M Memory: 16 GB 4800 MT/s DDR5 Copilot+ PC: No SSD: 1 TB Connectivity: Bluetooth 5.2 + WiFi 6E I gave the A6 high marks in my dedicated review from just over a year ago; GEEKOM has this to say about this compact Mini PC: GEEKOM A6 [Ryzen 7 6800H, 16GB+1TB] for $524 —was $649 (19% off) Next up is the MAX variant of A-series mini PCs in the Prime Day Sale. The GEEKOM A7 MAX [2026 Edition] powered by the AMD Ryzen 9 7940HS with 16GB of DDR5 and a 1TB SSD. Below are some of its more important specifications: Operating System: Windows 11 Pro CPU Model: AMD Ryzen 9 7940HS CPU Speed: 5.2 GHz Cache Size: 24 MB Graphics: Integrated AMD Radeon 780M Memory: 16 GB 5600 MT/s DDR5 Copilot+ PC: No SSD: 1 TB Connectivity: Bluetooth 5.2 + WiFi 6E I reviewed this Mini PC a year and a half ago, and praised it for its modern internals like a dedicated NPU and DDR5 memory, as such it is more than capable of keeping up with today's offerings of Mini PC on the market. GEEKOM A7 MAX [Ryzen 9 7940HS, 16GB+1TB] for $594 —was $699 (15% off) Next we have another in the MAX series of A mini PC. The GEEKOM A9 MAX powered by the AMD Ryzen AI HX 470 with 32GB DDR5 and a 2TB SSD. Below are some of its more important specifications: Operating System: Windows 11 Pro CPU Model: AMD Ryzen 9 AI HX 470 CPU Speed: 5.4 GHz Cache Size: 24 MB Graphics: Integrated AMD Radeon 890M NPU: 55 TOPS Copilot+ PC: Yes (combined NPU+CPU=86 TOPS) Memory: 32GB 5600 MT/s DDR5 SSD: 2 TB Connectivity: Bluetooth 5.4 + WiFi 7 We reviewed this Mini PC last month, also in the 64GB configuration. Be sure to check out both reviews before dropping this kind of money on it, you won't be sorry! I praised it for its excellent NPU (AI) performance and premium all-metal build, as such it is more than capable of keeping up with today's offerings of Mini PC on the market. GEEKOM A9 MAX [Ryzen AI 9 470 HX, 32GB+2TB] for $1,444 —was $1,699 (19.72% off) Last but not least we have the GEEKOM IT13 MAX, which is an Intel configuration featuring the Ultra 9 185H with 16GB DDR5 memory and a 1TB SSD. Below are some of its more important specifications: Operating System: Windows 11 Pro CPU Model: Intel Ultra 9 185H (65W TDP) CPU Speed: 5.1 GHz Cache Size: 24 MB Graphics: Integrated Intel ARC Graphics Copilot+ PC: No Memory: 16GB 5600MT/s DDR5 SSD: 1 TB Connectivity: Bluetooth 5.4 + WiFi 7 I never got a chance to review the IT13 MAX, but I did review the GEEKOM X14 Pro which has comparable specifications if you want to get an idea of the IT13 MAX's capabilities. In any case this is what GEEKOM has to say about this variant: GEEKOM IT13 MAX [Intel U9 185H, 16GB+2TB] for $764 —was $899 (15% off) Check out other US and UK deals too These are just a sample of discounts in GEEKOM's Prime Day Sale, you can check out the entire line up, which include more Intel and AMD mini PCs, discounted at up to 30% off, which was more than the recent Spring Sale they ran earlier this year. You can check out the entire lineup of Prime Day deals on the dedicated GEEKOM store page at Amazon in the following regions: Amazon US GEEKOM Prime Day Sales (up to 30% off) Amazon UK GEEKOM Prime Day Sales (up to 30% off) What's more, all products from GEEKOM receive a 3-year free Warranty from the date you receive the product. If needed, you can RMA or return locally relative to your region (the U.S. has a U.S. warehouse, mainland E.U. has a German warehouse, U.K. has a U.K. warehouse, Australia has an AU warehouse). To recap, here are all of the above mentioned deals, available on Amazon US. GEEKOM A5 [Ryzen 5 7430U, 16GB+512GB] for $371 —was $439 (15% off) GEEKOM A6 [Ryzen 7 6800H, 16GB+1TB] for $524 —was $649 (19% off) GEEKOM A7 MAX [Ryzen 9 7940HS, 16GB+1TB] for $594 —was $699 (15% off) GEEKOM A9 MAX [Ryzen AI 9 470 HX, 32GB+2TB] for $1,444 —was $1,699 (19.72% off) GEEKOM IT13 MAX [Intel U9 185H, 16GB+2TB] for $764 —was $899 (15% off) Please be aware that the above promotional discounts expire on June 26 Between June 23 - 26 it's Prime Day week on Amazon, click here to check out all the deals. As an Amazon Associate we earn from qualifying purchases.
    • Nice to see! Especially now with Arm64 VMs getting more popular and sometimes even cheaper than traditional x86 ones in datacenters.
  • 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
      487
    2. 2
      +Edouard
      204
    3. 3
      PsYcHoKiLLa
      94
    4. 4
      Michael Scrip
      91
    5. 5
      neufuse
      71
  • Tell a friend

    Love Neowin? Tell a friend!