Before dropping a line, separate the costs that would disappear from the ones you would keep paying. Profitability changes depending on how you allocate shared costs.
An example with numbers
A line brings in $8,000 of sales and has $6,000 of avoidable costs. If you allocate it $2,500 of overheads, it shows a $500 loss. If those overheads continue after dropping it, you would also lose the $2,000 it contributed towards them.
Try it with your numbers
Compare the line's result before and after the allocation. Identify which costs you could actually remove if the product disappeared.
Example figures for learning purposes. They are not a recommendation and do not replace professional advice.