Second...
By "delete" do you wish to get rid of the musical notation content (and leave empty measures); or do you wish to delete completely, and actually shorten the length of the score?
So...
If you wish to delete only content, select the first musical element (e.g., a note or rest) then hold Shift and select the last element. Once all is highlighted, press the delete key on the computer keyboard -- and blank measures will be left.
--OR--
If you wish to completely "delete a line" so that it "vanishes completely" (and actually shortens the length of the score), select the first measure then hold Shift and select the last measure. Once all is highlighted, hold Ctrl and press Delete. Important: This will "vanish" also the staves of any other (e.g., ensemble) instruments, because rests are not left behind in the vanished staff (as when only content of measures is deleted).
Comments
For clarity, there are 2 distinctions you must consider.
First...
By "line of music" do you mean a single "staff"
https://musescore.org/en/handbook/4/page-layout-concepts#staff
or a "line of music" for, say, a piano:
https://musescore.org/en/handbook/4/page-layout-concepts#grand-staff
or a "line of music" for, say, an ensemble:
https://musescore.org/en/handbook/4/page-layout-concepts#system
Second...
By "delete" do you wish to get rid of the musical notation content (and leave empty measures); or do you wish to delete completely, and actually shorten the length of the score?
So...
If you wish to delete only content, select the first musical element (e.g., a note or rest) then hold Shift and select the last element. Once all is highlighted, press the delete key on the computer keyboard -- and blank measures will be left.
--OR--
If you wish to completely "delete a line" so that it "vanishes completely" (and actually shortens the length of the score), select the first measure then hold Shift and select the last measure. Once all is highlighted, hold Ctrl and press Delete. Important: This will "vanish" also the staves of any other (e.g., ensemble) instruments, because rests are not left behind in the vanished staff (as when only content of measures is deleted).
For how to make selections, see:
https://musescore.org/en/handbook/4/selecting-elements#select-range