How to delete "used" product

Hello,

Please help me with the following.

I have some products which are out of stock. I have marked them as not for sale/not for purchase.
I no longer need the products in dolibarr so i need to delete them.
The delete button is disabled and on mouse over it shows “product is used”

Thank you!

That’s “by design”:

You should delete all datasets which refer to the product first.
Otherwise you (say) want to look up an old order - BUT your request could not be fulfilled, because the pointer to the product in this order is “dangling” (going nowhere).

Best regards

This will lead to clog the product list with unused/old products…

The product list chooser is built here:

… htdocs/core/tpl/objectline_create.tpl.php

Maybe you can add your own filter there?

Best regards