Avoiding taxes on a foreclosed rental

To avoid paying capital gains tax on a foreclosed rental, the homeowner has to consider bankruptcy.