If you want to delete some steps, you can do it in one shot. The Power Query Delete Until End feature helps to delete as many steps up to the end in one click.
Delete Steps Until End By Power Query
Let us understand this feature with the help of an example.
Step 1: Load the data and add Index Column
As discussed in the above topic, add an index column and rearrange the order of it. Also, change the header type as shown in below picture
Step 2: Delete Steps until End
After you modify the data and you realize that some steps are added extra that should not have been added, then you can delete them in one shot as given below.
Right-click on Added Index > Delete until End
Step 3: Delete Steps
When you click on Delete Until End option, a dialogue box appears on the screen that allows to click on the Delete option and delete all these steps.
This will remove all the steps performed after the Added Index step. Now your Applied Steps area will look like this.
Step 4: Close and Apply
After deleting these steps, data table will come back to its original form as shown in the below picture. Just click on Close & Apply button after you finish your task.
You can learn more :