@matsonmathew wrote:
I am planning to sell all my stock on October and don’t buy that particular stock for rest of the year. Will this clear my wash sale losses?
Yes, provided you have closed your positions and do not re-establish them within the requisite period, the losses on that security can be recognized.
The wash sale rule is one of the reasons some traders make an MTM (Section 475) election.