Terminal and shell

List and remove environment variables

See every environment variable, check one and remove one you no longer want.

Fill these in once
  1. List them all
    Terminal
    printenv
  2. Show one
    Terminal
    printenv API_URL
  3. Remove one from this terminal
    Terminal
    unset API_URL

    To remove it for good, delete its export line from ~/.zshrc.

  1. List them all
    Terminal · Ubuntu / Debian
    printenv
  2. Show one
    Terminal · Ubuntu / Debian
    printenv API_URL
  3. Remove one from this terminal
    Terminal · Ubuntu / Debian
    unset API_URL

    To remove it for good, delete its export line from ~/.bashrc.

  1. List them all
    PowerShell
    Get-ChildItem Env:
  2. Show one
    PowerShell
    $env:API_URL
  3. Remove one from this window
    PowerShell
    Remove-Item Env:API_URL
  4. Remove it for good
    PowerShell
    [Environment]::SetEnvironmentVariable("API_URL", $null, "User")