Changing URL of BuddyPress Groups

When I changed the name of a BuddyPress group, I wanted the URL to change.

For example:

mydomain.com/groups/oldname

is not

mydomain.com/groups/newname

after changing the name of the group, it still remains

mydomain.com/groups/oldname

I’m still on a development website and not a live site yet, so I want the URL to change to mydomain.com/groups/newname

How do I accomplish this?