You can select the checkbox in the top right corner of the messages you want to archive, then using the dropdown on the right just below the message list, you can download them in various formats. Once you have done that, you can delete them from your inbox.