{
  "slug": "fstrim",
  "term": "fstrim",
  "aliases": [],
  "definition": "fstrim is a util-linux command that asks mounted filesystems to discard unused extents through the Linux FITRIM ioctl.",
  "note": "The command, FITRIM interface and ATA TRIM operation are separate concepts. In v2.41.2, --all and --fstab select eligible mounted filesystems; --listed-in uses the first nonempty table, not their union. [manual]\n\nA successful exit does not establish complete coverage. Batch mode excludes some targets and does not count unsupported results as failures; --quiet-unsupported also normalizes a single-target unsupported result. [source]\n\nDry-run omits FITRIM. Verbose byte counts are potential discard, not unique physical reclamation or sanitization. [manual]\n\nFor monitoring, retain the intended inventory, selection rules, per-target outcomes and software version separately.\n\nA synthetic outcome model separates aggregate exit status from successful FITRIM calls; it does not execute fstrim. [model]",
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-04",
  "advantages": [
    {
      "text": "Filesystem-aware selection avoids treating arbitrary device ranges as unused.",
      "citationIds": [
        "manual"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Exit status alone cannot distinguish successful trimming from skipped or unsupported coverage.",
      "citationIds": [
        "source"
      ]
    }
  ],
  "related": [
    "fitrim",
    "discard",
    "trim",
    "thin-provisioning"
  ],
  "citations": [
    {
      "id": "manual",
      "title": "util-linux v2.41.2: fstrim selection, dry-run and reporting",
      "url": "https://raw.githubusercontent.com/util-linux/util-linux/v2.41.2/sys-utils/fstrim.8.adoc",
      "accessed": "2026-12-04"
    },
    {
      "id": "source",
      "title": "util-linux v2.41.2: fstrim_filesystem, fstrim_all_from_file, fstrim_all and main",
      "url": "https://raw.githubusercontent.com/util-linux/util-linux/v2.41.2/sys-utils/fstrim.c",
      "accessed": "2026-12-04"
    },
    {
      "id": "model",
      "title": "Hesela: executable fstrim batch-outcome illustration",
      "url": "https://hesela.dev/research/fstrim-coverage/README.md",
      "accessed": "2026-12-04"
    }
  ],
  "provenance": [
    "Source-grounded utility identity; does not rename or change the existing FITRIM or TRIM identifiers. No ioctl, discard operation or hardware measurement was performed."
  ]
}
