# Clear cookies in Postman

**URL:** <https://community.postman.com/t/clear-cookies-in-postman/2943>\
**Category:** Help Hub\
**Created:** [October 9, 2018, 1:17pm UTC](https://community.postman.com/t/clear-cookies-in-postman/2943 "2018-10-09T13:17:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raquel](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@Raquel](https://community.postman.com/u/Raquel)\
**Post date:** [October 9, 2018, 1:17pm UTC](https://community.postman.com/t/clear-cookies-in-postman/2943/1 "2018-10-09T13:17:48Z")

</div>

Hi all,

Does anyone know how can I clear the cookies in the pre-request? Thanks!

---

<div class="post-metadata">

**Author:** ![mick-mcbride](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/mick-mcbride/32/783_2.png) [@mick-mcbride](https://community.postman.com/u/mick-mcbride)\
**Post date:** [October 9, 2018, 5:09pm UTC](https://community.postman.com/t/clear-cookies-in-postman/2943/2 "2018-10-09T17:09:08Z")

</div>

@Raquel

There is a Feature request for this functionality.

> <https://github.com/postmanlabs/postman-app-support/issues/3312>
>
> I'm looking for a way to clear cookies between each test, I know I am able to do… this via the GUI but I want to do it automatically in the pre-request scripts. I tried \`document.setCookie = ...\`, but \`document\` isn't defined. 
> 
> My current work around is to set the cookies into global variables, and use these variables in the header values, which allows me to set the values to empty strings at the beginning of each test.

Mick

---

<div class="post-metadata">

**Author:** ![cmillensifer](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/cmillensifer/32/5676_2.png) [@cmillensifer](https://community.postman.com/u/cmillensifer)\
**Post date:** [September 24, 2020, 12:45am UTC](https://community.postman.com/t/clear-cookies-in-postman/2943/3 "2020-09-24T00:45:27Z")

</div>

> [@mick-mcbride](#):
>
> There is a Feature request for this functionality.

Any news on this front? It’s been just about 2 years!

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 24, 2020, 7:59am UTC](https://community.postman.com/t/clear-cookies-in-postman/2943/4 "2020-09-24T07:59:35Z")

</div>

Hey @cmillensifer,

Welcome to the community! 👋

Did you look at the Github issue and check the thread?

> <https://github.com/postmanlabs/postman-app-support/issues/3312#issuecomment-516965288>
>
> I'm looking for a way to clear cookies between each test, I know I am able to do… this via the GUI but I want to do it automatically in the pre-request scripts. I tried \`document.setCookie = ...\`, but \`document\` isn't defined. 
> 
> My current work around is to set the cookies into global variables, and use these variables in the header values, which allows me to set the values to empty strings at the beginning of each test.
