# How to delete "used" product

**URL:** <https://www.dolibarr.org/forum/t/how-to-delete-used-product/12869>\
**Category:** Using my Dolibarr\
**Created:** [November 17, 2015, 8:10pm UTC](https://www.dolibarr.org/forum/t/how-to-delete-used-product/12869 "2015-11-17T20:10:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![csc13](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/c/ebca7d/32.png) [@csc13](https://www.dolibarr.org/forum/u/csc13)\
**Post date:** [November 17, 2015, 8:10pm UTC](https://www.dolibarr.org/forum/t/how-to-delete-used-product/12869/1 "2015-11-17T20:10:36Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Peter\_A\_Gebhardt](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/peter_a_gebhardt/32/377_2.png) [@Peter\_A\_Gebhardt](https://www.dolibarr.org/forum/u/Peter_A_Gebhardt)\
**Post date:** [November 18, 2015, 8:57am UTC](https://www.dolibarr.org/forum/t/how-to-delete-used-product/12869/2 "2015-11-18T08:57:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![csc13](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/c/ebca7d/32.png) [@csc13](https://www.dolibarr.org/forum/u/csc13)\
**Post date:** [November 18, 2015, 2:15pm UTC](https://www.dolibarr.org/forum/t/how-to-delete-used-product/12869/3 "2015-11-18T14:15:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Peter\_A\_Gebhardt](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/peter_a_gebhardt/32/377_2.png) [@Peter\_A\_Gebhardt](https://www.dolibarr.org/forum/u/Peter_A_Gebhardt)\
**Post date:** [November 18, 2015, 5:29pm UTC](https://www.dolibarr.org/forum/t/how-to-delete-used-product/12869/4 "2015-11-18T17:29:34Z")

</div>

The product list chooser is built here:

… htdocs/core/tpl/objectline\_create.tpl.php

Maybe you can add your own filter there?

Best regards
