Foreclosure and Liens

Hello everyone,

When a property is purchsed from the bank(REO) due to foreclosure, are any of the property liens cancelled? irs, state revenue, materialsmen liens, and other such f.i.f.a’s?

what about a second mortgage lien?

Thank you all
Dan