You can delete any action steps by selecting them and then clicking on the trash icon, at the bottom of the actions panel. To select multiple steps you can hold down the Ctrl key (PC) or the cmd key (Mac) and click on each step.
But, are you sure you don't need these steps? The action recorded every step you took to refine the selection. If you delete these commands, the selection will look different when you run the action again.
My recommendation:
First deactivate (exclude) the particular steps instead of deleting them. To deactivate a step, click the check mark to the left of the action step:

Then run the action again. Are you happy with the result? Then delete the excluded steps. If not, activate them again.
Regards
Panos Efstathiadis