What is a computer actually doing when it fully deletes a file, and why are some files too big to go into the trash so they have to be “deleted permanently?”



What is a computer actually doing when it fully deletes a file, and why are some files too big to go into the trash so they have to be “deleted permanently?”

In: Technology

The files are basically moved to another temporary location (it says “move to recycle bin” vs “delete permanently”).

The recycle bin is usually a temporary location inside the drive partition your OS is installed in, and if you’re “deleting” a file in another location, a file larger than the available free space in your OS partition – it can’t be moved to that drive.

The trashbin is just a folder that isn’t really special except it remembers where the stuff came from before.

So files in it aren’t deleted at all yet.

If you actually delete a file it’s space in the memory is just declared empty. So the bits stay, but other programs can claim the space to save their own bits by then overwriting the old files for good

When you “fully delete” a file, the computer doesn’t automatically and instantly do anything – it just tells the hard drive “hey you can write over that old data with new data if you need to”. That’s why it’s possible in some cases to recover “deleted” files, because… the file’s still there until something else comes along and takes its place.

As far as the files being too big, that’s just an artificial limitation put on the Recycling Bin in Windows. They assume that if you delete a single Word document that you might need to easily recover that later, but if you are deleting a 500 MB installation file for something, you’ll probably need that space *sooner* rather than later and you probably *don’t* need that file again.

You can actually adjust the recycle bin’s limit to be bigger or smaller as you want. Making it bigger just means you won’t have as much free space on your hard drive when you *recycle* files until you actually manually empty the recycle bin, though.

When you say “fully deletes a file”, what do you mean by that (as there’s a few different potential meanings)?

* When a user presses delete, the file is moved to the recycle bin (it’s not actually moved, rather the reference to the file on disc gets moved).

* When a user right-clicks the recycle bin and presses “Empty Recycle Bin”, the reference to the file on the hard drive is deleted and the space the file took up is “marked for deletion”, at this point the file still exists, but not even the recycle bin keeps track of the disk space used by the file anymore and other write operations can overwrite that space (it’s at this point that Windows will “release” the disk space and show as available space on your drive).

* When you secure erase or zero the space used (such as with a “secure file deletion” or full format), the system will overwrite that space multiple times with random data and leave it marked for deletion (secure delete), or will write all zeroes to that space (full format/zero).

Hopefully that answers your deletion questions. As for why some files are too big for the recycle bin – Windows has a default maximum amount of space for the recycle bin. Files larger than that will skip the first option above and go immediately to the second. If your recycle bin is full and you add to it, it’ll automatically perform the second option on the oldest files to make enough space for the most recently deleted files.