In the main menu, there's an option for "Linkshell." Select the linkshell you want to retire from, and then when you click on it, you'll get several options: "Display Members," etc. Choose "Retire." It will confirm whether you want to retire from the linkshel. Choose "Yes," and you're out.

Have fun!