---
id: api/commands/clearallcookies
title: clearAllCookies | Cypress Documentation
description: Clear all browser cookies in Cypress.
section: api
source_path: docs/api/commands/clearallcookies.mdx
version: e6988a974973e9090ce70406c38cb2b9e0eac9fa
updated_at: '2026-05-15T15:50:22.536Z'
---
# clearAllCookies

Clear all browser cookies.

Cypress automatically clears all cookies _before_ each test to prevent state from being shared across tests when [test isolation](/llm/markdown/app/core-concepts/writing-and-organizing-tests.md#Test-Isolation) is enabled. You shouldn't need to use this command unless you're using it to clear all cookies inside a single test or test isolation is disabled.

## Syntax

```
cy.clearAllCookies()cy.clearAllCookies(options)
```

### Usage

**Correct Usage**

```
cy.clearAllCookies() // Clear all cookies
```

### Arguments

**options _(Object)_**

Pass in an options object to change the default behavior of `cy.clearAllCookies()`.

| Option | Default | Description |
| --- | --- | --- |
| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |
| `timeout` | [`responseTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `cy.clearAllCookies()` to resolve before [timing out](#Timeouts) |

### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)

*   `cy.clearAllCookies()` yields `null`.

## Rules

### Requirements [Learn about chaining commands](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Chains-of-Commands)

*   `cy.clearAllCookies()` requires being chained off of `cy`.

### Assertions [Learn about assertions](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Assertions)

*   `cy.clearAllCookies()` cannot have any assertions chained.

### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)

*   `cy.clearAllCookies()` should never time out.

Because `cy.clearAllCookies()` is asynchronous it is technically possible for there to be a timeout while talking to the internal Cypress automation APIs. But for practical purposes it should never happen.

## See also

*   [`cy.clearCookie()`](/llm/markdown/api/commands/clearcookie.md)
*   [`cy.getAllCookies()`](/llm/markdown/api/commands/getallcookies.md)
*   [`cy.getCookie()`](/llm/markdown/api/commands/getcookie.md)
*   [`cy.getCookies()`](/llm/markdown/api/commands/getcookies.md)
*   [`cy.setCookie()`](/llm/markdown/api/commands/setcookie.md)
*   [`Cypress.Cookies.debug()`](/llm/markdown/api/cypress-api/cookies.md)
