Trilium Backend API
    Preparing search index...

    Interface EraseExcessRevisionsOptions

    How far "Erase excess revision snapshots" should go. Both fields are optional: left out, the operation behaves exactly as the automatic trimming that runs after every saved revision.

    interface EraseExcessRevisionsOptions {
        keepNamedSnapshots?: boolean;
        snapshotsToKeep?: number;
    }
    Index
    keepNamedSnapshots?: boolean

    Spares named snapshots — those the user gave a description — from erasure, and leaves them out of the count as well, so the limit governs the automatic snapshots alone. Omitted, it falls back to the revisionIgnoreNamedSnapshots option.

    snapshotsToKeep?: number

    How many snapshots to keep per note, standing in for the revisionSnapshotNumberLimit option for this run. Negative keeps every snapshot (nothing is excess), zero keeps none; omitted falls back to the option itself.

    A note carrying a valid #versioningLimit follows its own label instead: that is a policy set on the note deliberately, and a one-off answer to the global setting does not overrule it.