1. Buy new rim ensuring it is one for one equal to the current one (first spoke offset left or right, inside diameter equal).
2. Tape new rim to old rim aligning the stem hole.
3.Loosen spokes all around but do not remove them.
4. Move spokes one at a time to the new rim, near side to near side, then far side to far side. Nipples should be loose.
5. Untape old rim from new rim.
6. True and tension as required, radially and laterally.
7. Go for a ride.
8. YMMV.