Once the dock restarts, you should see a blank space after the last
application that is permanently in the Dock (before the icons for
applications that are currently running but not always in the Dock).
You can now drag the empty spaces to where you want them, or
right-click on them and select "Remove from Dock" if you no longer