TL;DR: how to remove the unconfirmed transaction, and create a new one.
You can actually follow the guide link from Charles-Tim, but I don’t think that actually removes the unconfirmed transaction because as you know an unconfirmed transaction cannot be removed, what is basically done is you’re double spending same transaction and since the new one would have a much higher transaction fee it gets confirmed first and then invalidate the first one. Even if you delete the local transaction and didn’t broadcast a new one it will still be there and could get confirmed later if the mempool congestion reduces before it is totally dropped from all nodes