# Question about my computer Recycle Bin

**URL:** <https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135>\
**Category:** Factual Questions\
**Created:** [June 6, 2020, 1:48am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135 "2020-06-06T01:48:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Little\_Nemo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/little_nemo/32/3120_2.png) [@Little\_Nemo](https://boards.straightdope.com/u/Little_Nemo)\
**Post date:** [June 6, 2020, 1:48am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/1 "2020-06-06T01:48:44Z")

</div>

Yes, once again, I am having a problem figuring out something my computer is doing. Stop laughing; you’ll be old too some day.

This time it’s my Recycle Bin. I have been using some of the time I have on hand to sort through computer files. And this has involved dumping a lot of files into my Recycle Bin and clearing them out.

But on several occasions I have noticed something I can’t figure out. I will have a bunch of files in my Recycle Bin. I will click the button to Empty the bin. The files will all supposedly be deleted and the bin will report that it’s empty. But the next day, when I open the Recycle Bin, a bunch of the files that were supposedly deleted the day before are back in the bin.

Not an urgent problem. I just re-empty the bin to delete them a second time. But why is this happening?

---

<div class="post-metadata">

**Author:** ![Kron](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kron/32/12444_2.png) [@Kron](https://boards.straightdope.com/u/Kron)\
**Post date:** [June 6, 2020, 2:26am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/2 "2020-06-06T02:26:25Z")

</div>

I’ve seen this happen only when I have vast numbers of files (total filecount, not size). I’m really not certain of the mechanism that causes it.

However, if you are certain you want the files removed, you can bypass the recycle bin by holding SHIFT during deletion.

---

<div class="post-metadata">

**Author:** ![Little\_Nemo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/little_nemo/32/3120_2.png) [@Little\_Nemo](https://boards.straightdope.com/u/Little_Nemo)\
**Post date:** [June 6, 2020, 5:12am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/3 "2020-06-06T05:12:05Z")

</div>

> [@Kron](#):
>
> I’ve seen this happen only when I have vast numbers of files (total filecount, not size).

That’s probably it.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [June 6, 2020, 8:57am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/4 "2020-06-06T08:57:34Z")

</div>

At least one reason this can happen is if any process running in the computer has the file open, it cannot be deleted. Note that “deleting” a file, in modern systems, doesn’t actually delete anything, just moves it to the recycle folder. Deleting files from the recycle folder is when the file really gets deleted. So that’s when you see the case that it can’t be deleted if the file is still open.

I think there may be further cases where the operating system gets a little confused and thinks a file is still open even though the process that had it open is long gone. I suspect this may happen if the process terminates (abnormally or perhaps even normally) while leaving an open file open. It’s possible the operating system might not always clean up fully when that happens, leaving loose ends around. (Unix and Linux users, for example, may be familiar with “Zombie” processes that refuse to disappear even after they are dead.)

Re-booting a system typically cleans up most of that kind of stuff. Although I have seen occasional exceptions to even that.

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [June 6, 2020, 9:58am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/5 "2020-06-06T09:58:05Z")

</div>

> [@Little\_Nemo](#):
>
> I will have a bunch of files in my Recycle Bin. I will click the button to Empty the bin. The files will all supposedly be deleted and the bin will report that it’s empty. But the next day, when I open the Recycle Bin, a bunch of the files that were supposedly deleted the day before are back in the bin.

Are those files _exactly_ the same as the ones deleted (identical size, name, timestamp, etc.)? I’m wondering if you have some background or periodic process that uses temporary files, and if it finds its workfiles unavailable, recreates them.

You could test this by leaving the (now empty) recycle bin display open, in the foreground where you can keep an eye on it. Do nothing else on the computer for a while (overnight?) and see if the display shows new files popping up.

---

<div class="post-metadata">

**Author:** ![bob\_2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bob_2/32/3341_2.png) [@bob\_2](https://boards.straightdope.com/u/bob_2)\
**Post date:** [June 6, 2020, 1:04pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/6 "2020-06-06T13:04:24Z")

</div>

It is also worth mentioning that ‘deleting’ files from the recycle bin does not actually delete them. If you think of it all as a paper filing system, the file name that you see on the screen is really the address of the file, if it was a paper file in a cabinet, It might point you to cabinet 5, drawer 2, “something meaningful”. What 'deleting it does, is to take the address away from the index while leaving the file, “something meaningful”, still in the drawer.

Your computer may, eventually, use the space for something else at some point. If the files were something illegal (and I am not for a moment suggesting that this is the case) and some law enforcement agency really wanted to, they could find those abandoned files and look at them, even though your computer ‘forgot’ where they are.

If you really want to delete files completely, there are free programs that will do it by overwriting them with something else.

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [June 6, 2020, 1:42pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/7 "2020-06-06T13:42:50Z")

</div>

> [@bob\_2](#):
>
> …  
> If you really want to delete files completely, there are free programs that will do it by overwriting them with something else.

Which won’t gain you any more free storage space; that’s strictly a security measure.

---

<div class="post-metadata">

**Author:** ![bob\_2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bob_2/32/3341_2.png) [@bob\_2](https://boards.straightdope.com/u/bob_2)\
**Post date:** [June 7, 2020, 8:56am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/8 "2020-06-07T08:56:22Z")

</div>

> [@Musicat](#):
>
> Which won’t gain you any more free storage space; that’s strictly a security measure.

I don’t understand that. Once the address is lost, the occupied space becomes available again. Yes, it still had (random/rubbish) data on it, but your computer will just overwrite that whenever it needs to.

Unless I am wrong?

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [June 7, 2020, 9:27am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/9 "2020-06-07T09:27:15Z")

</div>

> [@Senegoid](#):
>
> I think there may be further cases where the operating system gets a little confused and thinks a file is still open even though the process that had it open is long gone. I suspect this may happen if the process terminates (abnormally or perhaps even normally) while leaving an open file open. It’s possible the operating system might not always clean up fully when that happens, leaving loose ends around. (Unix and Linux users, for example, may be familiar with “Zombie” processes that refuse to disappear even after they are dead.)

I object to insinuations that beautiful properly-designed operating systems like Unix have anything in common with Micro$oft Windo$e. 😃

Unix does not forget to close files when a process abends. If no links remain, the file will be unlinked and its space reclaimed.

And ‘Zombie’ processes don’t hang around because of OS negligence. They have, by definition, already been destroyed except for their exit status which is deliberately preserved in case it’s requested by the parent process. When that parent exits, the Zombie will also disappear.

---

<div class="post-metadata">

**Author:** ![road\_lobo](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@road\_lobo](https://boards.straightdope.com/u/road_lobo)\
**Post date:** [June 7, 2020, 11:10am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/10 "2020-06-07T11:10:54Z")

</div>

This is Windows 10? Thus the file system is NTFS? On an SSD or spinning rust?

The drive may be approaching the long goodbye. Or the file system is corrupted. Investigate the SMART status of the drive and run chkdsk.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [June 7, 2020, 11:35am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/11 "2020-06-07T11:35:02Z")

</div>

> [@Senegoid](#):
>
> At least one reason this can happen is if any process running in the computer has the file open, it cannot be deleted. Note that “deleting” a file, in modern systems, doesn’t actually delete anything, just moves it to the recycle folder. Deleting files from the recycle folder is when the file really gets deleted. So that’s when you see the case that it can’t be deleted if the file is still open.

I’m pretty sure Windows won’t let you delete a file if any program has it open. I remember that much from Windows XP. [This seems to more-or-less confirm my memories.](https://www.makeuseof.com/tag/5-ways-delete-file-use-windows/)

(You can delete a file “out from under” a Unix process, but the disk space won’t be cleared until the last process which has it open closes it.)

> [@](#):
>
> I think there may be further cases where the operating system gets a little confused and thinks a file is still open even though the process that had it open is long gone.

I seriously doubt this. OSes have to keep track of which processes are running and which ones aren’t, and if they get that wrong, you’ll have a dead system in very short order.

(The scheduler would be Mighty Unhappy if the process table was suddenly at variance with reality, for one thing.)

> [@](#):
>
> I suspect this may happen if the process terminates (abnormally or perhaps even normally) while leaving an open file open. It’s possible the operating system might not always clean up fully when that happens, leaving loose ends around.

I’m finding it hard to believe an OS kernel wouldn’t immediately free the kernel data structures associated with a process when that process exits.

> [@](#):
>
> (Unix and Linux users, for example, may be familiar with “Zombie” processes that refuse to disappear even after they are dead.)

A zombie process isn’t a process: It’s an unclaimed death certificate. When a process exits in a Unix-like OS, it leaves a record of its passing including a number which can (sometimes) be inspected to determine whether it died “of natural causes” or not. The OS keeps records of this stuff because the still-living process which launched that now-deceased one might want to know whether its children are encountering fatal errors. If the parent process never claims that info, the OS keeps it around until that parent process dies, at which point everything is cleaned up by process number 1, init, the ultimate ancestor of _all_ processes.

The only thing I can think of you might be talking about is uninterruptible sleep; a long-term uninterruptible sleep might be caused by a process waiting on a disk which simply isn’t responding, possibly because it’s mounted on another system via NFS and the LAN suddenly went flaky. A process waiting on a defunct drive is still “there” it’s just catatonic, because the OS has put it in suspended animation until the disk it’s waiting on has come through with whatever the process has asked for. _Those_ processes typically can’t be killed with anything short of reboot.

Of course, I can’t quite see how any of this has any relevance whatsoever to the OP.

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [June 7, 2020, 11:57am UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/12 "2020-06-07T11:57:21Z")

</div>

> [@bob\_2](#):
>
> > [@Musicat](#):
> >
> > Which won’t gain you any more free storage space; that’s strictly a security measure.
> 
> I don’t understand that. Once the address is lost, the occupied space becomes available again. Yes, it still had (random/rubbish) data on it, but your computer will just overwrite that whenever it needs to.

If you delete a file, then remove the reference from the Recycle Bin, the data space is available for reuse, even though the original data is probably still sitting somewhere, orphaned. Smart programs can find these orphans and recover the data.

If security is a concern and you want to avoid recovery, you can overwrite the actual data with zeros or garbage data. This action does not make any more data space available because it already was.

Does that make sense?

---

<div class="post-metadata">

**Author:** ![GESancMan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/gesancman/32/2923_2.png) [@GESancMan](https://boards.straightdope.com/u/GESancMan)\
**Post date:** [June 7, 2020, 3:29pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/13 "2020-06-07T15:29:27Z")

</div>

> [@Derleth](#):
>
> > [@Senegoid](#):
> >
> > I think there may be further cases where the operating system gets a little confused and thinks a file is still open even though the process that had it open is long gone.
> 
> I seriously doubt this. OSes have to keep track of which processes are running and which ones aren’t, and if they get that wrong, you’ll have a dead system in very short order.
> 
> (The scheduler would be Mighty Unhappy if the process table was suddenly at variance with reality, for one thing.)
> 
> > [@Senegoid](#):
> >
> > I suspect this may happen if the process terminates (abnormally or perhaps even normally) while leaving an open file open. It’s possible the operating system might not always clean up fully when that happens, leaving loose ends around.
> 
> I’m finding it hard to believe an OS kernel wouldn’t immediately free the kernel data structures associated with a process when that process exits.

Dude. Have you ever _used_ Windows? This was one of the things that drove me craziest about it. It would never let me delete a damn file or folder because “files are still in use,” when they clearly weren’t. And as **Senegoid** says, rebooting usually cleared it up.

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [June 7, 2020, 3:44pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/14 "2020-06-07T15:44:53Z")

</div>

> [@GESancMan](#):
>
> Dude. Have you ever _used_ Windows? This was one of the things that drove me craziest about it. It would never let me delete a damn file or folder because “files are still in use,” when they clearly weren’t. And as **Senegoid** says, rebooting usually cleared it up.

Having used Windows, all versions, for years, I can confirm this is a common problem. The “files in use” message is one of the most useless ones ever; it doesn’t show which files or which programs are involved.

And some programs (video editors, for example) spawn auxiliary utilities (background shadow file creation, audio analysis, etc.) which may or may not close when the main app does. The user is not told of these, and it takes some computer expertise to find them. These “extra” programs are often the culprit to “file open” problems.

---

<div class="post-metadata">

**Author:** ![Cleophus](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Cleophus](https://boards.straightdope.com/u/Cleophus)\
**Post date:** [June 7, 2020, 4:35pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/15 "2020-06-07T16:35:54Z")

</div>

> [@Musicat](#):
>
> If you delete a file, then remove the reference from the Recycle Bin, the data space is available for reuse, even though the original data is probably still sitting somewhere, orphaned. Smart programs can find these orphans and recover the data.
> 
> If security is a concern and you want to avoid recovery, you can overwrite the actual data with zeros or garbage data. This action does not make any more data space available because it already was.
> 
> Does that make sense?

It does not, because that is not how the Recycle Bin works.

First, the Recycle Bin is only used for user-deleted files from Windows Explorer. Files deleted through the various Windows APIs, as would be done by software, do not go through the Recycle Bin.

Second, the Recycle Bin, “under the hood”, is just another folder on the file system. Deleted files are simply moved to it using exactly the same mechanisms as any other file move. The files are deleted from there using typical Windows API calls. There is no “reference” to be orphaned. There is only the one instance of the file at all times.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [June 7, 2020, 5:18pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/16 "2020-06-07T17:18:24Z")

</div>

“Emptying the Recycle Bin” is supposed to delete a file for real by reducing the number of hard links. When that gets to zero is when the physical space gets marked as free and can be potentially overwritten. In NTFS, all this metadata should be in the Master File Table.

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [June 7, 2020, 5:27pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/17 "2020-06-07T17:27:15Z")

</div>

> [@Cleophus](#):
>
> It does not, because that is not how the Recycle Bin works.
> 
> First, the Recycle Bin is only used for user-deleted files from Windows Explorer. Files deleted through the various Windows APIs, as would be done by software, do not go through the Recycle Bin.
> 
> Second, the Recycle Bin, “under the hood”, is just another folder on the file system. Deleted files are simply moved to it using exactly the same mechanisms as any other file move.

The “deleted” files are not moved. Only the reference (the directory entry) is altered. This entry is a “pointer,” a common computer term. Data is rarely moved, only the pointer to where it resides is modified.

You can observe this easily. Try coping a large block or blocks of data, say 500GB, from one disk drive to another on the same computer. This will require the physical data to be moved, and it will take some time.

Then try to “copy” the same data from one location _on the same drive_. This should be nearly instantaneous, as only the directory pointers need to be changed, and this is a comparatively small amount of data. (That only works if the OS is smart enough to know this. Recent Windows versions (from 7?) know this, older ones did not (DOS?).

I’m not sure how Linux handles this, but the concept has been in Computer Science for decades (I learned about it ca. 1978).

> [@](#):
>
> The files are deleted from there using typical Windows API calls. There is no “reference” to be orphaned. There is only the one instance of the file at all times.

You are correct about only one instance of the file exists, but you might misunderstand how the reference (directory pointers) work and how files are flagged in the directory. Before the Recycle Bin was developed, DOS/Windows would delete a file with a single byte entry; the first byte of the file’s directory reference block.

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [June 7, 2020, 5:38pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/18 "2020-06-07T17:38:46Z")

</div>

> [@Derleth](#):
>
> …  
> I seriously doubt this. OSes have to keep track of which processes are running and which ones aren’t, and if they get that wrong, you’ll have a dead system in very short order.
> 
> (The scheduler would be Mighty Unhappy if the process table was suddenly at variance with reality, for one thing.)…

This is only a gut feeling (working around such problems is what I do now; diagnosing such problems isn’t in my job description), but I think such bugs are often the cause of OS system crashes. Windows is not known to be stable. Although old bugs have been fixed or minimized (MS often takes 20 years to do it :rolleyes: ), the increased complexity of newer programs keeps the bug list pretty full, and OS crashes have not gone away, just gotten harder to find. Yes, the task scheduler can get mighty unhappy sometimes.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [June 7, 2020, 5:47pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/19 "2020-06-07T17:47:52Z")

</div>

NTFS allows more than 1 directory entry linking to the same file. Once a file is completely deleted, some housekeeping needs to be done, including updating the $Bitmap which lists which clusters are in use.

I believe you are wrong about copying files: NTFS does not support instantly making snapshots of large files and will have to actually copy all the data when you make a copy of your 500 GB file. If you MKLINK a link it doesn’t need to copy any data blocks, though.

---

<div class="post-metadata">

**Author:** ![wolfpup](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/wolfpup/32/10618_2.png) [@wolfpup](https://boards.straightdope.com/u/wolfpup)\
**Post date:** [June 7, 2020, 6:44pm UTC](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135/20 "2020-06-07T18:44:52Z")

</div>

> [@Musicat](#):
>
> > [@](#):
> >
> > Dude. Have you ever used Windows? This was one of the things that drove me craziest about it. It would never let me delete a damn file or folder because “files are still in use,” when they clearly weren’t. And as Senegoid says, rebooting usually cleared it up.
> 
> Having used Windows, all versions, for years, I can confirm this is a common problem. The “files in use” message is one of the most useless ones ever; it doesn’t show which files or which programs are involved.
> 
> And some programs (video editors, for example) spawn auxiliary utilities (background shadow file creation, audio analysis, etc.) which may or may not close when the main app does. The user is not told of these, and it takes some computer expertise to find them. These “extra” programs are often the culprit to “file open” problems.

Having used Windows since version 2.0 I can confirm that this is definitely the case and always has been. But sometimes it’s even worse than that. I have a small free program that I got somewhere called FDEL (“Force Delete”) which traces the process holding a file open, closes it, and then deletes the file. But sometimes it doesn’t work – sometimes there seems to be a phantom file handle just sitting there with no associated process. It’s remarkable how often I can’t dismount a removable drive because Windows reports that a process still has file(s) open yet there is absolutely nothing else running that could possibly have a file open on the device (and I have auto-indexing disabled on all my external devices).

> [@DPRK](#):
>
> I believe you are wrong about copying files: NTFS does not support instantly making snapshots of large files and will have to actually copy all the data when you make a copy of your 500 GB file. If you MKLINK a link it doesn’t need to copy any data blocks, though.

I presume that what **Musicat** is referring to is moving (not copying) a file to another location on the same logical device (same drive letter). That process is identical to renaming the file – it just makes a change to the file table, and is essentially instantaneous regardless of file size. In fact on the old PDP-10 timesharing system the RENAME command was the method used to move a file from one folder (directory) to another on the same account. But actually copying a file creates another physical instance of it which is of course a different matter, as is moving a file across to a different logical or physical device.

[Next page](https://boards.straightdope.com/t/question-about-my-computer-recycle-bin/855135.md?page=2)
