Skip to content

Instantly share code, notes, and snippets.

@spookyuser
Last active September 14, 2023 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spookyuser/ad47277b34ef1a9cc900585344176eea to your computer and use it in GitHub Desktop.
Save spookyuser/ad47277b34ef1a9cc900585344176eea to your computer and use it in GitHub Desktop.
kinda delete all vercel envs.sh
# Step 1: List all environment variables and store them in a variable
env_vars=$(vercel env ls)
# Step 2: Parse the output to get variable names (assuming the names are in the first column)
# This step can vary based on the actual output format of `vercel env ls`
env_var_names=$(echo "$env_vars" | awk '{if(NR>2) print $1}')
# Step 3: Loop through each environment variable name and remove it
for name in $env_var_names
do
# Step 3.1: Delete each variable with '-y' option to skip confirmation
vercel env rm $name -y
done
@spookyuser
Copy link
Author

Written by gpt 💁‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment