It's not a coincidence that this is happening to mostly elderly people who otherwise own their properties in the clear, people who are often burdened with serious health problems.
There is a simple fix. Require the liens to be paid off when there is a change of ownership. The city knows what it is owed, and that it will get the money eventually. If the city needs the money today, it ought to be able to borrow the funds (not all that different that accounts receivable factoring). Throwing people out of their homes over small amounts is inhumane.