The key is that you need to know the passphrase to do it, if you don't know the password for the key then you can't remove the key since it cannot be decrypted.
ssh-keygen is the easiest method and openssl can be used to manually remove the key and output it to a new file, which you can then copy back over top of the encrypted file.
After that your public key authentication will work without any password prompt because it is no longer encrypted. Make sure you understand the security implications. Usually the key is used for manual operations and is removed to do some sort of automation/automatic/passwordless login to do monitoring/maintenance etc without needing to know the password on the remote host/target.
ssh-keygen -p
openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa_new
#
check that the key is good and not encrypted and then copy back
mv ~/.ssh/id_rsa_new ~/.ssh/id_rsa
ssh, keygen, id_rsa, howto, passphrase, password, encryption, usedthe, decrypted, easiest, method, openssl, manually, output, encrypted, authentication, prompt, implications, manual, operations, automation, passwordless, login, monitoring, maintenance, etc, rsa, id_rsa_new, mv,