When the county forecloses on a property, all liens attached to the property are extinguished, except for claims from higher levels of government. So let's say the property had:
- a mortgage against it
- a lien for unpaid property taxed imposed by the country
- a lien filed as part of a legal judgment against the owner (let's say that the previous owner had been accused of killing his wife, was acquitted in a criminal trial, but the wife's family won a civil judgment for wrongful death)
- a lien filed by the IRS for non-payment of income tax
And for good measure, let's also cloud the title by assuming that one of the prior owners bought the house as a married couple, but during their ownership they divorced and one of the spouses never signed the deed transferring title to the previous owner.
As I understand matters, when the county forecloses every one of those liens except the IRS lien would be eliminated. (Being part of a higher level of government, the IRS lien is superior to the county lien and can't be eliminated by the county.) In addition, the cloud on the title would be quieted. The way I see it, buying a foreclosed property at a tax auction is a pretty secure way of getting clean title.
Note, however, that a tax auction is not the same as a public auction on the courthouse steps. The courthouse steps types of auctions are normally undertaken by a private party such as a lender who is foreclosing on a lien. Those auctions only eliminate all liens that are junior to the lien on which foreclosure is occurring, and those auctions do not eliminate any liens filed by government agency. IOW - if you buy a timeshare on a courthouse steps type of auction all past due taxes bills come with the property.
***
As I recall, several years ago some resorts in either San Bernardino or Riverside County balked at transferring ownership in their records to tax auction purchasers until the purchasers paid outstanding annual fees associated with the previous owners. The tax collectors office intervened with the resorts and got that matter straightened out pretty quickly.