1. select the relevant layer in the Layer Panel and activate the editing
2. Select the orphan line segment with the selection tool in the editing toolbar
3.  Press the delete key of your key board

That's all.