Android Cerficate Reset

I need to reset my android keystone certificate because I recently switched to expo, I downloaded the automatically generated keystore from and I ran:

keytool -genkeypair -alias MY_ALIAS -keyalg RSA -keysize 2048 -validity 9125 -keystore MY_KEYSTORE.jks

but when I specified my password I’m getting:

`keytool error: java.lang.Exception: Key pair not generated, alias ALIAS_NAME already exists`

How can I fix it? Thanks

You cannot replace a cert for an alias in one go. You need to first run:

keytool -delete -alias MY_ALIAS -keystore MY_KEYSTORE.jks

And then you can run your command to add a new one.