Remove repeating list items

Remove repeating list items by keeping the first occurrence of each value and dropping every subsequent repeat. Original order is preserved. Comparison is case-insensitive and trimmed by default - `Apple` and ` apple ` count as the same value and one is dropped.

Input
Ready
Output
Live

First-occurrence-wins dedupe

The op walks every line in order, tracks which values have been seen (via a Set), and keeps only the first of each. Subsequent occurrences are skipped. Same op as Dedupe - two URLs for the same tool, differently framed.

Default comparison key lowercases and trims each line before checking the Set. Flip Case sensitive on to treat `Apple` and `apple` as distinct values (both kept). Flip Trim off to treat ` apple ` (with spaces) as different from `apple`.

For finding the duplicates instead (a report of which values repeat), use Find duplicates. For keeping only items that appear exactly once (dropping ALL copies of repeaters), use Find unique items.

How to use remove repeating list items

  1. 1Paste your list into the input panel
  2. 2Output drops every repeat - first occurrence kept, subsequent dropped
  3. 3Toggle Case sensitive to treat case differences as distinct
  4. 4Toggle Trim off to treat whitespace differences as distinct
  5. 5Original line order is preserved

Keyboard shortcuts

Drive ListShift without touching the mouse.

Shortcut Action
Ctrl ZUndo last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor
EscExit fullscreen
Ctrl KOpen the command palette to jump to any tool
Ctrl SSave current pipeline draft Plus
Ctrl PRun a saved pipeline Plus

What this tool actually does

First-occurrence dedupe via Set-based tracking.

Keeps first occurrence

In `apple / banana / apple / orange / banana`, the second `apple` and second `banana` are dropped. Result: `apple / banana / orange`.

Preserves original order

No sorting. Items stay in the positions their first occurrences took in the input.

Case-insensitive by default

`Apple`, `APPLE`, `apple` all collapse to one. Flip Case sensitive on to treat them as distinct.

Trim-aware by default

`apple`, ` apple`, `apple ` all compare equal. Flip Trim off to treat them as distinct.

Blank lines pass through the check

Blanks are part of the line set - if you have two blanks, the second is dropped as a dup. To remove blanks entirely, chain Remove empty lines.

Worked example

Second `apple` and second `banana` dropped. Order preserved.

Input
apple
banana
apple
orange
banana
Output
apple
banana
orange

Settings reference

How each option shapes the output using the sample above.

Setting What it does Effect on the sample
Case sensitive: off (default), Trim: on (default) `Apple` = `apple` = ` apple ` Standard dedupe
Case sensitive: on `Apple` ≠ `apple` Both kept if present
Trim: off Whitespace variations count ` apple` stays alongside `apple`
Blank lines (automatic) First blank kept, subsequent blanks dropped Chain Remove empty lines to drop all
Line order (automatic) First occurrence wins No sorting - original sequence kept

FAQ

Does it keep the first or last occurrence?
First. The second and subsequent occurrences are dropped. For "keep last instead", reverse the list with Reverse a list, dedupe, then reverse again.
How is this different from Dedupe?
Dedupe uses the same op, same defaults. Two URLs, same tool.
What if I want to drop ALL occurrences of duplicates (keep only unique items)?
Use Find unique items - it keeps only items that appear exactly once in the input and drops every copy of anything that repeats.
How does Case sensitive interact with Trim?
Independent toggles. With both on: ` Apple` and `apple ` are distinct. With both off (default): they collapse. Pick the combination that matches your data.
How do I find which items are repeating?
Use Find duplicates - it reports the values that appear more than once (each listed once).