# Allow Users to "lock" certain Environment Variables so they're not overwritten/removed

**URL:** <https://community.postman.com/t/allow-users-to-lock-certain-environment-variables-so-theyre-not-overwritten-removed/3255>\
**Category:** Help Hub\
**Created:** [November 12, 2018, 2:47pm UTC](https://community.postman.com/t/allow-users-to-lock-certain-environment-variables-so-theyre-not-overwritten-removed/3255 "2018-11-12T14:47:33Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [November 12, 2018, 2:47pm UTC](https://community.postman.com/t/allow-users-to-lock-certain-environment-variables-so-theyre-not-overwritten-removed/3255/1 "2018-11-12T14:47:33Z")

</div>

I raised this in GitHub a while back, I’ll raise it here too incase other Postman users want to upvote it.

> <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)

I’d like to see the functionality to allow users to “lock” environment variables. That way we can call the postman.clearEnvironmentVariables() function to clear 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://us1.discourse-cdn.com/getpostman/original/2X/f/f1614f5e3b42b12345b412d0f097c1b9a0496a0f.png)

---

<div class="post-metadata">

**Author:** ![tmccann](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/tmccann/32/3550_2.png) [@tmccann](https://community.postman.com/u/tmccann)\
**Post date:** [November 13, 2018, 12:21am UTC](https://community.postman.com/t/allow-users-to-lock-certain-environment-variables-so-theyre-not-overwritten-removed/3255/2 "2018-11-13T00:21:27Z")

</div>

I really like this idea. I have been running into issues like this a lot more recently myself.

---

<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:** [November 13, 2018, 9:20am UTC](https://community.postman.com/t/allow-users-to-lock-certain-environment-variables-so-theyre-not-overwritten-removed/3255/3 "2018-11-13T09:20:37Z")

</div>

This would also be cool when sharing environments with other users in your team/workspace, so you can lock variables that cannot be over-written by members of your team.

---

<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 9, 2024, 2:34pm UTC](https://community.postman.com/t/allow-users-to-lock-certain-environment-variables-so-theyre-not-overwritten-removed/3255/4 "2024-12-09T14:34:43Z")

</div>

Closed on December 9, 2024, 2:34pm UTC

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