# Remove Duplicates

This action removes all the rows that are duplicate.

{% hint style="warning" %}
It is best practice to always specify a column, unless you have a very special case. Specifying a column will make your TaskBot run faster.
{% endhint %}

Notes: Files in *file* columns will be ignored when searching for duplicates.

The TaskBot will remove **the latest (the newest) rows** and preserve previous rows per default. If you want to reverse this behavior, then check the checkbox *Preserve newest rows* (note that this option is only available in native tables and not available for Google Sheets).

### Do Not Place Inside Loops

This is a batch operation. This means that all table rows - no matter how many there are - are fetched and the duplicate removal is applied to the whole table. Hence, it does not make sense to use this on every loop iteration.&#x20;

{% hint style="warning" %}
If you place this building block inside a loop, duplicates will only be removed once.
{% endhint %}

### Video Tutorial

{% embed url="<https://youtu.be/O9nZUwabzBw?si=A_ILoIOKLtUsf6Gu>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zerowork.io/using-zerowork/using-building-blocks/remove-duplicates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
