Last active
September 14, 2023 14:51
-
-
Save spookyuser/ad47277b34ef1a9cc900585344176eea to your computer and use it in GitHub Desktop.
kinda delete all vercel envs.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Written by gpt 💁♀️