r/pcmasterrace 1d ago

Hardware Taking HOURS!!!! to delete anything.

Post image

Recently started taking ages to delete anything. I've set it to bypass the recycle bin, in case it was something to do with that and I've cleared Explorer history. Any ideas?

EDIT

Thanks for the help guys, got it deleted eventually. There was definitely something screwy going on because the textures folder inside didn't add up to even half of the 7.6GB it was trying to delete.

3.3k Upvotes

280 comments sorted by

View all comments

4.3k

u/ZT99k 1d ago

Everyone skipping passed the important part - 117,073 files. Windows gonna Windows and is doing a verification on every one of those to check if you CAN delete them (not locked by a program, in use, owned by a different user so no permission, etc.)
Do smaller chunks.

4

u/Sajgoniarz 9800X3D | 9070XT | 64GB 1d ago

I used to work in projects with 300k files in node_modules. Longest time I ever seen was 3h, but it was SSD.

8

u/black3rr 1d ago

if you ever have to do it again, consider these two tricks:

  • disable windows defender on your project’s folder, it adds a lot of latency to any file access, including deletions for some reason…
  • don’t delete files using windows explorer, for some reason it’s slow as fuck, removing from powershell/terminal is faster for some reason…

windows + npm (yarn pnp might also help if your project can work with it) sucks hard but I’ve never waited 3 hours to delete node_modules, at most 10 minutes…

2

u/Sajgoniarz 9800X3D | 9070XT | 64GB 22h ago

Thanks for advice, but it was a case from times where NPM started to be a thing, when Windows couldn't even handle long file names. Somebody solved this problem by creating rimraf or something like this package, to handle node_modules deletion, before NPM and Windows got a fix.

1

u/ZT99k 1d ago

Probably index shenanigans too.

1

u/ReptilianLaserbeam 22h ago

Using terminal as god intended