A long time still as not everyone would be capable of becoming more self sustaining. Sure you could grow a little apartment balcony potted tomato plant, or a bigger backyard garden in the suburbs, maybe sneak in a couple hens depending on your zoning laws, but so much of the country/world is a major city environment. Kinda hard to raise and butcher a home grown, grass fed steer in your front yard in suburbia. There would still be a huge need for commercially produced foods and imported goods to sustain the teeming masses.
We’re on a 10 acre ranchette property and grow a big garden, have hens we collect eggs from, we do not butcher any animals here, but our neighbor raises free range, pastured, grass fed beef and we do consume some meat grown locally.. Not much, maybe a few times a month and have cherry trees, some citrus, and hope to plant an olive and pistachio orchard at some point, but, being in the middle of a major drought , which is another big issue in certain areas like CA. Water is a huge commodity and it takes a LOT of water to grow produce or raise livestock, even small livestock. Hens require a lot of water to produce eggs and larger animals even more.
While I am not a fan of factory farming I do not have a problem consuming modest amounts of home grown beef and poultry. Anyway, I digress ( haha..there’s that ramble kickin’ in ) but, as wonderful as a perfect self sustainable Utopia would be I do not think it is realistic, sadly.