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.
If you don't want to remove any history from your system or merge items, you can mark the items that you no longer want to see as "Discontinued" and then check the "Exclude Discontinued Items" on the stock code selection window. This will hide the items from the selection window, but still maintain the items and all of the transactions that they are referenced by.