How do you clear codes

Really? I know they can read the codes but didn’t know they could erase them, you would have thunk they would have said so when I got the code read, bought the part.