Undoing / deleting "horizontal line" in writer

I had a problem undoing or deleting a “horizontal line” that I inserted in a document.

I found out a way : position on the line and modify the layout of the paragraph : it was been marked as having a border on the bottom. just indicate no borders and it is OK

When posting here, always mention OS name, LO version and save format.

There is no “primitive object” as a horizontal line. Primitive object in Writer is a paragraph. A paragraph has many attributes, among which a border. The border is used to “simulate” a horizontal line (may be in upper or lower position) extending from paragraph margin to paragraph margin.

From the wording of your question, it looks like you apply formatting manually. Writer is based on the concept of styles which automate formatting and allow separation of contents (text) from appearance. Have a look at the Writer Guide.

Also note (1): The default setting for bottom borders as paragraph attributes is
Merge with next paragraph.
If this setting is active for a sequence of paragraphs the de-selection of a bottom border for the last paragraph of the sequenc only moves the visible border line one paragraph upwards if there is another paragraph still having set the attribute.
Also note (2): There is a dangerous setting under
>Tools>Autocorrect>>Autocorrect Options...>>Options>>Apply border
which easily can cause border settings to be applied inadvertently. Such Autospoil tools you may better disable.

No problems with your remark.
I added the horizontal line with the option in the dropdown list under “invoegen” (“insert”) in the top line


Using an insert line I was looking for a delete . . .

How about Ctrl+Z?