How can I delete part of the track?

Denny_2019 Registered Users Posts: 1
New Seeker
edited January 24 in TomTom Sports
Hello, I forgot to turn off the activity after the trek. How can I erase excess data.? I exported the file to Gpx, deleted all the lines that are not needed but I cannot re-import the modified activity. Thank you

Mod edit: Machine translated from Italian