Charles Offenbacher
Charles Offenbacher

Reputation: 3132

Completely reset Heroku config

I want to completely replace a Heroku config with a local .env file. The command below seems to only update values that are in both files, not erase server config settings. Any ideas on how to simply do this?

heroku config:push --overwrite

Upvotes: 2

Views: 451

Answers (1)

Slukehart
Slukehart

Reputation: 1037

Assuming you're using OS-X, this can be accomplished with these two steps:

Unset config vars

$ heroku config:unset $(heroku config | perl -nle'print $& if m{(^.*)(?=:)}')

Push local .env

$ heroku config:push

Hope this helps :)

Ps: Keep in mind Heroku makes it simple to roll back changes made to config vars.

Upvotes: 3

Related Questions