Skip to content
Bytearium

No ads or affiliate links active

Hardware

TRIM for SSDs

TRIM tells an SSD which blocks are free after a delete. It is a hint, not a promise, and the weekly job usually takes care of it.

This entry is still below our minimum bar for the search index (length and number of sources) and is being reworked. It is therefore not listed in search engines.

Deleting a file only crosses it off a list. Your SSD still hugs the old data until someone tells it to let go.

The short answer

TRIM is a command that lets the operating system tell an SSD which blocks no longer hold useful data, for example after you delete a file [3]. On SATA it is called TRIM, on SCSI it is UNMAP, and NVMe does it with the Dataset Management command and its Deallocate attribute [3][5]. It is a hint and not a promise, because the drive may choose to take no action [5][6]. Our assessment: leave the defaults on, check once that TRIM is active, and let the weekly job do the rest.

How it works

  1. Why it is needed. Flash memory cannot overwrite data in place, so new data goes elsewhere until old blocks are cleaned up. Deleting a file changes only the file system's tables, and the SSD has no way to know the sectors are free [3].
  2. One idea, three commands. Windows 7 introduced a standard way to tell SSDs about unneeded sectors, defined in the T13 specification as TRIM. For SCSI devices, the T10 specification defines the similar UNMAP command [3]. The NVMe specification describes its Deallocate function as similar to ATA Data Set Management with Trim and to SCSI UNMAP [5].
  3. A hint. Windows treats TRIM and Unmap as hints and does not wait for a result [3]. NVMe calls the Dataset Management command advisory: a compliant controller may take no action [5]. A read of a deallocated range returns zeros, ones or the last data written [6]. So TRIM is not a secure erase.
  4. On Windows. Delete notifications (also known as trim or unmap) are on by default for NTFS unless an administrator disables them. No restart is needed to change this. A device that reports no TRIM support gets no notifications, and some devices may slow down with the feature on [1]. Optimize-Volume -ReTrim resends TRIM for all unused sectors, and for an SSD with TRIM support it is the default operation [2].
  5. On Linux. fstrim discards unused blocks on a mounted filesystem. The man page says frequent fstrim or mount -o discard might shorten the life of poor-quality SSDs, that once a week is enough for most desktop and server systems, and that not every device supports a queued trim, so each run can slow other disk access [4]. Most current distributions ship a fstrim.timer, while USB SSDs may need manual setup [7].

A practical example

Windows (read-only check, then an administrator window for the action) [1][2]:

fsutil behavior query DisableDeleteNotify
Optimize-Volume -DriveLetter C -ReTrim -Verbose

The first command prints 0 when TRIM is enabled and 1 when it is disabled [1]. The second resends TRIM for the unused space on C:. On Linux [4][7]:

systemctl status fstrim.timer
sudo fstrim -av

-a trims all mounted filesystems that support discard, and -v prints how much was trimmed [4]. We have not recorded the TRIM state of our own drives (our inventory covers 14 to 16 Oct 2026), so we claim none.

Checklist

  • Run the check command once after you install a new SSD or reinstall the system.
  • Keep the default weekly job and avoid discard on slow or cheap drives [4].
  • Run a manual retrim only after big deletions, and do it when the PC is idle [2][4].
  • Check separately whether USB or external SSDs get TRIM; they may need setup [7].
  • Do not treat TRIM as secure erase; use the drive's erase feature or encryption when it matters [6].
  • Skip TRIM tuning on HDDs; Windows only uses it where the device reports support [1].

Primary sources

These sources are the basis of this page. That does not mean every claim was checked individually; whether a review record exists is shown above under “Status”. The interpretation and checklist are our own work.

There is no documented review record for this version yet. The text relies on the sources listed.

How this page was made: Bytearium creates these pages with the help of AI and is responsible for publishing them. AI can be wrong, so we show our sources and review status openly.

  1. Microsoft Learnfsutil behavior
  2. Microsoft LearnOptimize-Volume
  3. Microsoft LearnApps can send "TRIM and Unmap" hints
  4. man7.orgfstrim(8) – Linux manual page
  5. NVM ExpressNVM Command Set Specification
  6. Microsoft LearnNVME_CDW11_DATASET_MANAGEMENT structure
  7. PlugableTrim an SSD in Linux

This page has no ads and no affiliate links.