Looks like a bug such that modifying a connection with -save -replace results in a duplicate (ie the new connection is created, but the old one isn't removed).
I deleted my connection manager folders to start from scratch for a blog post, so possibly i corrupted them, is anybody else able to try to reproduce?
➜ ~ sql -nolog
SQLcl: Release 25.1 Production on Wed Apr 23 16:26:57 2025
Copyright (c) 1982, 2025, Oracle. All rights reserved.
SQL> cm list
.
SQL> conn -save tom -savepwd tom/tom@localhost:1521/orclpdb1
Name: tom
Connect String: localhost:1521/orclpdb1
User: tom
Password: ******
Connected.
SQL> cm list
.
└── tom
SQL> conn -save tom -replace -savepwd tom/tom@localhost:1521/orclpdb1
Name: tom
Connect String: localhost:1521/orclpdb1
User: tom
Password: ******
Connected.
SQL> cm list
.
├── tom
└── tom