Last active
February 5, 2025 05:47
-
-
Save naaman/1384970 to your computer and use it in GitHub Desktop.
[WARNING THIS WILL HARD DELETE YOUR APPS. YOU COULD LOSE DATA. MAKE SURE YOU KNOW WHAT YOURE DOING!!!!!!!!!!] Delete all heroku apps from bash terminal -- no script file required
This file contains 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
for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done |
Please, add unicode support!
+1 10q
Awesome, thank you
@crj1001 I'm really sorry that happened. I hope you were able to ultimately restore your stuff :/
I forgot I even made this and only just used it to delete all my personal test apps as I'm leaving Heroku (as my employer, not the product). I updated the subject with a giant warning, but seems like it's still useful so am leaving this around.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran this command carelessly thinking it would apply to Heroku apps based off the current directory structure...
Now I've lost a production database... and I must ask, why would anyone EVER need this script? Who on earth has so many throw-away Heroku apps that it is actually too much work for them to run the heroku apps:destroy calls individually, typing in the confirmation every time? Someone mentioned they used it to change a certificate... what?? What kind of workflow requires the destruction of dozens of heroku apps to change a certificate? Why would any workflow need this?
Please prefix this with more of a warning. It looks like I'm not the only one to fall into this google-paste trap.