After a membership has been purchased, you are unable to remove the membership owner from the membership transaction. If you need to make a change who owns the membership, you can transfer a membership to a new owner. See this article for more information:

However for the sub-members you are able to remove them from a membership. Go into the membership owner's constituent record and navigate to their Memberships tab. Under the original transaction you will see on the grid a list of sub-members. Each row will have a broken link icon. Clicking that Icon will remove that sub-member from this membership. You can also go into each of the sub-member's constituent records and on their Membership tab you will also find an unlink icon.