A trim command (known as TRIM in the ATA command set, and UNMAP in the SCSI command set) allows an operating system to inform a solid-state drive (SSD) which blocks of data are no longer considered to be 'in use' and therefore can be erased internally. Trim was introduced soon after SSDs were introduced. Because low-level operation of SSDs differs significantly from hard drives, the typical way in which operating systems handle operations like deletes and formats resulted in unanticipated progressive performance degradation of write operations on SSDs. Trimming enables the SSD to more efficiently handle garbage collection, which would otherwise slow future write operations to the involved blocks. Although tools to "reset" some drives to a fresh state were already available before the introduction of trimming, they also delete all data on the drive, which makes them impractical to use for ongoing optimization. As of , many SSDs had internal garbage collection mechanisms for certain filesystems (such as FAT32, NTFS, APFS) that worked independently of trimming. Although this successfully maintained their lifetime and performance even under operating systems that did not support trim, it had the associated drawbacks of increased write amplification and wear of the flash cells. TRIM is also widely used on shingled magnetic recording (SMR) hard drives. Background Because of the way that many file systems handle delete operations, by flagging data blocks as "not in use", storage media (SSDs, but also traditional hard drives) generally do not know which sectors/pages are truly in use and which can be considered free space. Contrary to (for example) an overwrite operation, a delete will not involve a physical write to the sectors that contain the data. Since a common SSD has no knowledge of the file system structures, including the list of unused blocks/sectors, the storage medium remains unaware that the blocks have become available. While this often enables undelete tools to recover files from electromechanical hard disks, despite the files being reported as "deleted" by the operating system, it also means that when the operating system later performs a write operation to one of the sectors, which it considers free space, it effectively becomes an overwrite operation from the point of view of the storage medium. For magnetic disks, an overwrite of existing data is no different from writing into an empty sector, but because of how some SSDs function at the lowest level, an overwrite produces