Hi Matthias,
You will want to delete your ending bar line and add an ending bar line to the last measure of your score. Once you have the ending bar line in the correct position, you can then delete all of the bar lines preceding it. Just click and drag to highlight the bars and then go to Edit>Delete. If you use the delete option from the Edit window, it will delete notation and bars.