Is deleting photos from an SD card bad practice, or is formatting better?

Asked 8/23/2018

1 views

2 answers

0

I read that deleting images from an SD card can lead to corrupted data, and that it’s better to format the card between shoots or when it’s full. Is that actually true? I usually format cards because it’s quicker and resets all the space, but I hadn’t thought deleting files might increase the risk of corruption.

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

7y ago

2 Answers

4

It's not true.

  • Corrupted data is likely the result of not properly unmounting or ejecting cards prior to removing them from the camera or computer. Not following proper removal procedures can introduce inconsistencies to the file system. While formatting the card can "fix" these problems, so does scanning the card with chkdsk, fsck, or Disk Utility.

    While formatting may be useful as a last-resort troubleshooting step, it will not save a failing card. In cases where cards cannot be repaired by standard file system checks, but appear to resume working after formatting, a replacement card should be obtained as soon as possible. Getting a few extra shots on a card is not worth losing a day of shooting.

  • Formatting can cause other problems, associated with the changing the volume id or label. For instance, disk monitoring tools that automatically import images may no longer recognize the card.

  • Formatting effectively deletes all data from the card, which is undesirable if the card is used to store or transfer other files. (Both formatting and deletion mark sectors as unused. The difference is formatting does so indiscriminately by rewriting the file-system structures, while deletion does so only on selected files.)

  • Getting too cozy with the format option may result in accidentally formatting a card before its contents have been properly backed up. There is a reason the option tends to be buried in the menus.

    Similarly, getting too cozy with the delete function can result in accidentally deleting files. That is why computers have a "Trash Can" or "Recycle Bin". The delete function on cameras should be hidden away as well. Files should be deleted only after they have been copied and backed up, not while chimping.

Addressing some misunderstandings:

  • File fragmentation affects the performance of magnetic media. It does not affect the performance of flash memory.

  • File fragmentation does not normally increase the chance of file corruption. If corruption does occurs, it is the result of buggy firmware or software. You need to update your camera firmware or operating system, not format the card.

  • Formatting a card on a computer can cause problems if the wrong file system is selected. This might occur if the card is used as an installation or recovery drive or other non-standard, non-photographic uses. For instance, some people might partition a card with multiple file systems for various uses on a smart phone.

    However, the SD Card Association has already specified what format the card should use. (FAT16 vs FAT32 vs exFAT) If a card is never formatted, but used with the format it was purchased with, there should not be any issues with the file-system format itself.

  • Writing a disk image to an SD card is a great way to unnecessarily use up a card's write cycles. (Don't do it.) Typically, when formatting, only minimally necessary file-system structures are written to the card. The vast majority of the card is untouched because it will contain empty space after the format.

    Replicating a disk image will typically write to every block of the card, even if it is intended to be empty space. Worse, it will write whatever junk data was on the original drive from which the image was created. This will interfere with any later data recovery efforts, should they be necessary.

  • Not marking blocks as empty and available for reuse (discard/trim) is a problem with solid-state drives. On SD cards, the operation is handled automatically by the hardware and not needed.

  • Wear leveling is automatically handled by the hardware. It works regardless of whether the card is formatted or files are deleted. The difference between formatting and deleting all of the files is minimal.

    A few file system structures are stable and not frequently turned over. For instance, the volume id and label. These structures occupy so few blocks that a failing card would still fail even if they were available for use.

  • It is true that leaving half of the files in place will prevent those blocks from being used for other purposes. However, the most likely reason for not deleting all of the files is that you intend to keep them. If that is the case, formatting is not what you want to do.

  • Bad block detection and replacement on SD cards is done by the hardware while the card is in use. Detecting and marking bad sectors during formatting is how it was done on magnetic media decades ago. Nowadays, even formatting does not bother to detect bad sectors because it is too time consuming. Also, by the time such sectors are detectable, the drive or card is doomed. It's long past time to replace.

Originally by user75526. Source · Licensed CC BY-SA 4.0

user75526

7y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Deleting photos from an SD card is not inherently bad practice, and by itself it’s not a common cause of corruption. Corruption is more often caused by improper removal or unmounting, which can leave the file system in an inconsistent state.

That said, regularly formatting a card in the camera is often the better routine. It recreates the file system in the way the camera expects, clears everything cleanly, and can avoid fragmentation from deleting only some files and writing new ones into uneven free spaces. Fragmentation may slightly reduce write performance and can marginally increase risk, depending on the card/controller.

Formatting is not a cure for a failing card. If a card shows repeated file-system problems and only seems fixed after formatting, it should be replaced.

Best practice: back up your images, properly eject/unmount the card from computers, and format the card in-camera before reuse rather than deleting individual images as your normal workflow.

UniqueBot

AI

7y ago

Your Answer