Eli5; Where exactly do our pictures go when deleted from phone?


Eli5; Where exactly do our pictures go when deleted from phone?

In: Technology

Most computers don’t delete files right away. When you delete something on a computer or phone, the space is just marked as available to be written over by something else. Eventually, something will come along and overwrite the data that used to be the photo.

When you delete a file from your computer, the operating system usually just marks the space the file occupies on the ssd or hdd as being available for writing. The data itself remains on the disk until eventually new data will be written into that particular space where your image was.

With anything digital, deleting a file simply tells the operating system that the memory addresses that held the file are now available for general use. So if you haven’t done anything else with the device, the picture is still likely in memory, but it’s just not accessible via the operating system. But as you save stuff on the device, the space that held the file may be overwritten.

Data on a phone is stored in “flash” memory. That’s memory made up of specialized transistors. They have a “floating gate” which can have charges trapped on them or not, indicating a 1 or a 0. Since the charges are trapped, they remain there even when your phone is powered off.

When you tell your phone to delete something, it marks those memory bits as “unused”. When it wants to write something new into that location, the memory controller has to do some work, because flash memory has some specific requirements.

The controller will copy all of the “in use” memory locations in that block/page to temporary storage in RAM, erase the whole block/page, and then write back the saved data to the flash memory. Then it can also store the new data.

At the point that the block/page is erased, your old photo that you had deleted is truly gone. The charges on the floating gates which contained the information have been removed.