title: How to remove an environment variable on GitHub actions?
body: <h3>Context</h3>
  <p>On <a href="https://docs.github.com/en/actions/learn-github-actions/environment-variables" rel="nofollow noreferrer">https://docs.github.com/en/actions/learn-github-actions/environment-variables</a>
  they describe a way to add an environment variable with yaml:</p>
  <pre class="lang-yaml prettyprint-override"><code>jobs:
    job_name:
      env:
        NAME: value
  </code></pre>
  <p>On <a href="https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions/#setting-an-environment-variable" rel="nofollow noreferrer">https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions/#setting-an-environment-variable</a> linked from the same place, shows how to add an environment variable from script steps:</p>
  <pre class="lang-sh prettyprint-override"><code>echo &quot;NAME=value&quot; &gt;&gt; $GITHUB_ENV
  </code></pre>
  <h3>Question</h3>
  <p><em>I'm looking for a way to do the opposite: given that an env var was added with one of the above options, <strong>fully remove it</strong> so that subsequent job steps don't see it either.</em></p>
  <p>I tried</p>
  <pre class="lang-sh prettyprint-override"><code>echo &quot;NAME=&quot; &gt;&gt; $GITHUB_ENV
  </code></pre>
  <p>but it just sets it to empty string, I need it gone so that <code>env</code> doesn't list it any more.</p>
  <h3>Resources</h3>
  <p>Raised it GitHub community too: <a href="https://github.community/t/remove-environment-variable-from-job/214815" rel="nofollow noreferrer">https://github.community/t/remove-environment-variable-from-job/214815</a></p>