Generally, you need to file returns going back six years. This will depend on the facts and circumstances of your situation. The IRS typically requests that taxpayers prepare and file all due returns except in instances where there is an indication that the taxpayer's failure to file the required return or returns was willful or if there is any other indication of fraud. If indications of willfulness or fraud exist, special procedures for handling those returns are followed. If indications of willfulness or fraud do not exist, the extent to which compliance for prior years will be enforced is determined by reference to several factors, including any special circumstances existing in the case of a particular taxpayer or class of taxpayers. Normally, application of these factors will result in enforcement of delinquency procedures for not more than six years.
Sources:
Publication 17 (2023)
§ 6501. Limitations on assessment and collection
Rev. Rul. 92-109
IRM Part 5. Collecting Process. Chapter 1. Field Collecting Procedures. Section 11. Delinquent Return Investigations
Publication 5316 (11/2023)
Publication 535 (2022)