# Pro-tip: Dynamically unset Postman Environment Variables - Postman Blog

**URL:** <https://community.postman.com/t/pro-tip-dynamically-unset-postman-environment-variables-postman-blog/5646>\
**Category:** Help Hub\
**Created:** [May 28, 2019, 9:58pm UTC](https://community.postman.com/t/pro-tip-dynamically-unset-postman-environment-variables-postman-blog/5646 "2019-05-28T21:58:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristen](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kristen/32/1594_2.png) [@kristen](https://community.postman.com/u/kristen)\
**Post date:** [May 28, 2019, 9:58pm UTC](https://community.postman.com/t/pro-tip-dynamically-unset-postman-environment-variables-postman-blog/5646/1 "2019-05-28T21:58:33Z")

</div>

[https://blog.getpostman.com/2019/05/28/pro-tip-dynamically-unset-postman-environment-variables/](https://blog.getpostman.com/2019/05/28/pro-tip-dynamically-unset-postman-environment-variables/)

---

<div class="post-metadata">

**Author:** ![postman-paul540](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/postman-paul540/32/149_2.png) [@postman-paul540](https://community.postman.com/u/postman-paul540)\
**Post date:** [May 29, 2019, 7:05am UTC](https://community.postman.com/t/pro-tip-dynamically-unset-postman-environment-variables-postman-blog/5646/2 "2019-05-29T07:05:51Z")

</div>

Here’s how I’ve been clearing all environment vars apart from my “important” ones.  
I’ve been using this method for years haha  
 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/c/c311abdb33e1397decc1b0e62db3ea2be457fa98.png)

And since we’re on the subject, here’s the Feature Request I raised in relation to this 2 years ago 😛

> <https://github.com/postmanlabs/postman-app-support/issues/3106>
>
> \*\*Feature Request:\*\*
> I'd like to see the functionality to allow users to "lock"… environment variables. That way we can call the postman.clearEnvironmentVariables() function to clears all environment variables with the exception of the "locked" ones.
> 
> Here's how I'm currently doing that same thing in Postman now:
> !\[image\](https://cloud.githubusercontent.com/assets/9334128/26718591/6c9a17b0-4779-11e7-98ba-1cdd21d74e67.png)

---

<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:** [May 29, 2019, 7:30am UTC](https://community.postman.com/t/pro-tip-dynamically-unset-postman-environment-variables-postman-blog/5646/3 "2019-05-29T07:30:40Z")

</div>

This blog post was created off the back of this community tip 🙂

> [@Sharing tips and tricks with others in the Postman community](https://community.postman.com/t/sharing-tips-and-tricks-with-others-in-the-postman-community/5123):
>
> I’ve found in my short time working for Postman, that everyone I talk to uses the application in slightly different ways. We all have our little tips and tricks that we use locally that have helped us with the tasks that we have been doing. These might be small things like creating a small helper function or much more bigger things. I was inspired by @tmccann’s [post](https://community.postman.com/t/dynamic-data-in-ci-cd-with-newman/5072) this week about a particular way he’s created a process to solve a problem he was having, in his context. This was new knowledge…

@VincentD123 also created this [post](https://community.postman.com/t/yet-another-way-to-clean-your-environment-variables-but-still-keep-some/5456) with a different method of doing this _clear down_ operation.

Lots of different ways to do the same thing which personally, I kinda like, it then leaves it up to our users to add their own personal stamp on things. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 11, 2024, 4:06pm UTC](https://community.postman.com/t/pro-tip-dynamically-unset-postman-environment-variables-postman-blog/5646/4 "2024-12-11T16:06:11Z")

</div>

Closed on December 11, 2024, 4:06pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
