---
title: "clearPermissions() | Grafana k6 documentation"
description: "Clears all permission overrides for the BrowserContext."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# clearPermissions()

Clears all permission overrides for the [browser context](/docs/k6/next/javascript-api/k6-browser/browsercontext/).

### Returns

Expand table

| Type            | Description                                                                                                                                         |
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| `Promise<void>` | A Promise that fulfills when the permissions have been cleared from the [browser context](/docs/k6/next/javascript-api/k6-browser/browsercontext/). |

### Example

JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```javascript
import { browser } from 'k6/browser';

export const options = {
  scenarios: {
    browser: {
      executor: 'shared-iterations',
      options: {
        browser: {
          type: 'chromium',
        },
      },
    },
  },
};

export default async function () {
  const context = await browser.newContext();
  await context.grantPermissions(['clipboard-read']);
  // do stuff ...
  await context.clearPermissions();
}
```
