This is a question with no easy answer; it depends on your circumstances. Below are some general guidelines.
You owe additional tax and situations (2), (3) and (4) below do not apply to you: keep records for 4 years.
You do not report income that you should report and it is more than 25% of the gross income shown on your return: keep records for 6 years.
You file a fraudulent return: keep records indefinitely.
You do not file a return: keep records indefinitely.
You file a claim for credit or refund after you file your return: keep records for 3 years from the date you filed your original return or 2 years from the date you paid the tax, whichever is later.
You file a claim for loss of worthless securities or bad debt deduction: keep records for 7 years.
Keep all employment records for at least 4 years after the date that the tax becomes due or is paid, whichever is later.
If you sell property or investments, you’ll need to prove what you paid for them; so keep those records for at least four years after the tax year in which you reported the sale of that property or investment.