Credential handling in 2.6 had various issues that have been addressed in 2.8
Juju will not let you remove a credential if doing so would break a model due to that credential being used (that's the expected behaviour in comment #1). This check wasn't done in 2.6 from memory.
With needing to restart the agent in 2.6, that's possible also as work was done in 2.8 to make updating things such as credentials and cloud info visible to the agents without a restart.
I suggest upgrading to 2.8 as short of critical security fixes, there won't be any more 2.6 releases.
Credential handling in 2.6 had various issues that have been addressed in 2.8
Juju will not let you remove a credential if doing so would break a model due to that credential being used (that's the expected behaviour in comment #1). This check wasn't done in 2.6 from memory.
With needing to restart the agent in 2.6, that's possible also as work was done in 2.8 to make updating things such as credentials and cloud info visible to the agents without a restart.
I suggest upgrading to 2.8 as short of critical security fixes, there won't be any more 2.6 releases.