Atrex uses a relational database to store the information in the system. As such, you cannot delete items that have references to them from other places in the package. So as long as there is some history that references an item, you won't be able to delete the item.
The two options that you have are to purge your transaction history ( invoices, orders, quotes, po's, etc ) and then delete the items.
The other option would be to create a stock code called "DELETED" and then merge the items you want to get rid of into the "DELETED" item. Without purging the transaction history, the second method is really the only option you have. Just be aware that when you merge items, the transaction history will be updated to reflect the change as well, so if you reprint an old invoice it will show the merged items as "DELETED" rather than the stock code that you originally invoiced.