> For the complete documentation index, see [llms.txt](https://docs.cometh.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cometh.io/advanced/session-keys/remove-a-session-key.md).

# Remove a session key

```typescript
import {
    erc7579Actions,
    smartSessionActions,
} from "@cometh/connect-sdk-4337";

// At session key creation, you'll get the associated permissionId that you need to store
export const permissionId = "0x...";

const safe7559AccountClient = smartAccountClient.extend(smartSessionActions())
            .extend(erc7579Actions());

const removeSessionsResponse = await safe7559AccountClient.removePermission({
    permissionId: permissionId,
});

await safe7559AccountClient.waitForUserOperationReceipt({
    hash: removeSessionsResponse.userOpHash,
});
```
