# Unused target still in use

**URL:** <https://forum.greenbone.net/t/unused-target-still-in-use/22453>\
**Category:** Building from Source and Advanced Topics\
**Created:** [August 12, 2026, 3:18am UTC](https://forum.greenbone.net/t/unused-target-still-in-use/22453 "2026-08-12T03:18:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andpf](https://forum.greenbone.net/letter_avatar/andpf/32/6_449c533f586939b6e5f246632a46421f.png) [@andpf](https://forum.greenbone.net/u/andpf)\
**Post date:** [August 12, 2026, 3:18am UTC](https://forum.greenbone.net/t/unused-target-still-in-use/22453/1 "2026-08-12T03:18:11Z")

</div>

I’m trying to clean-up an old target which isn’t referenced by any report or task, nothing in trashcan either, but it is still marked as “in-use”.

So I went to psql, and tried to DELETE the row, resulting in a FK constraint violation from targets\_login\_data.

The SSH credentials of that target cannot be edited, since it is marked in-use, so I cannot resolve this with GSA (I’m running the latest community containers)

DELETE target\_login\_data WHERE target=3;  
DELETE target WHERE id=3;  
finally did the job, but invading the DB doesn’t feel quite right…

NB: The database was initialized two years ago with 22.4, maybe the FK is ON DELETE CASCADE now instead of ON DELETE RESTRICT?

There’s another un-deletable target lurking around, so if you can give me an official way to clean-up, please advise.

Regards, Andreas

---

<div class="post-metadata">

**Author:** ![system](https://forum.greenbone.net/uploads/default/original/2X/4/4660e797edfaea797a8c9965246072ea26732804.png) [@system](https://forum.greenbone.net/u/system)\
**Post date:** [November 10, 2026, 3:18am UTC](https://forum.greenbone.net/t/unused-target-still-in-use/22453/2 "2026-11-10T03:18:21Z")

</div>

Closed on November 10, 2026, 3:18am UTC

This topic was automatically closed after 90 days. New replies are no longer allowed.
