Here is my example. I have an 8-plex that I bought in 2017 for $175,000. He was desperate to sell because his Rural Dev. loan had been paid off and his section 8 classification ended, however tenants weren't paying the full rent like they were supposed to. His numbers were horrible because of this, and also because he's an older gentleman and paid for everything to be done there. It had been listed for a while and a couple of sales had fallen through. I offered him his price on a contract for deed, with 5% interest, $800 per month, and $10,000 now, $10,000 in 6 months, and $10,000 in 12 months. I set it for 5 years, but told him I'd pay it off as soon as I could get bank financing. (A little over a year later I was able to get the financing and the appraisal came out at $300,000)
I immediately laid down the law there, started getting the rents up to market, got rid of bad tenants, remodeled 3 of the units, added landscaping, took care of deferred maintenance, etc. If I were to sell it right now for the $300,000 (I currently owe $150,000) I would walk away with $150,000 that I could use on a 1031 as 20% down on a $750,000 building.
I would only be using the money I have already invested, plus equity, and my NOI on the larger building would be much greater. This is why I will sell. However, I'm waiting until next summer because I'm moving and want to invest there :)
You have to sell when it works for you. The whole goal is to improve your standard of living and cash flow.