Most people don't believe IRS taxes can be discharged in bankruptcy. However, income taxes owed to the IRS can be discharged in bankruptcy, under certain circumstances. There are basically 5 rules for income taxes to be discharged or canceled in bankruptcy: (1) the taxes (for a particular tax year) must be 3 years old, measured from the due date of the tax return, including any extensions; (2) the tax return must have been filed more than 2 years prior to the filing of the bankruptcy; (3) the taxes must have been "assessed" or determined by the IRS to be due, more than 240 day (about 8 months) before the filing of the bankruptcy.
Also, (4) the taxpayer must not have filed a false or fraudulent tax return; and (5) the taxpayer must not otherwise have attempted to evade or defeat the tax. Therefore, in many cases, so long as the taxes are more than 3 years old, and the taxpayer filed an honest return, income taxes can be discharged or forgiven in bankruptcy. This is NOT the case with so called "payroll taxes," i.e. where you withheld taxes from employees of yours. These are considered "trust fund" taxes and cannot be discharged in bankruptcy.
Also, if the IRS files a Notice of Tax Lien prior to the filing of a bankruptcy, the tax lien is not discharged, as it is considered a property right. However, so long as the taxes themselves are discharged, the tax lien only attaches to the property that the taxpayer owned as of the date of filing the bankruptcy, not "after-acquired" property. And the IRS tax lien only exists, so long as the underlying taxes are enforceable.
Generally speaking, the IRS only has 10 years to collect taxes, after the date of assessment. Unless this "statute of limitations" is extended for some legal reason, the IRS loses the ability to collect taxes, 10 years after the date they are assessed. Any tax lien that was filed to secure those taxes, becomes null and void when the statute of limitations expires. This is a very complicated area of law, and is not for amateurs! If you are considering filing a bankruptcy to eliminate tax debts, by all means hire an attorney that is experienced in this area.