The Three Timing Rules
For income taxes to be dischargeable, ALL three must be met: (1) 3-year rule -- the tax return was due at least 3 years ago, (2) 2-year rule -- the return was actually filed at least 2 years ago, (3) 240-day rule -- the tax was assessed at least 240 days ago.
Never Dischargeable
Payroll taxes and trust fund taxes are never dischargeable. Taxes where no return was filed are never dischargeable. Taxes resulting from fraud or willful evasion are never dischargeable. Penalties related to nondischargeable taxes are also nondischargeable.
Tax Liens Survive
Even if the personal liability for a tax debt is discharged, a recorded tax lien survives bankruptcy and continues to attach to your property. You must deal with liens separately -- either paying them, negotiating with the IRS, or waiting for them to expire.
Full tax debt guide
Bankruptcy and Taxes