Once upon a time, people did not buy animal feed. They grew it. Many people now are wanting to go back to a more self-sustaining type of agriculture, but they have no idea how to feed their animals without buying feed.
If you think differently about it, you can gradually move to a more natural diet for your animals, but some animals will adapt more slowly than others, since they've been bred for generations to eat less wholesome foods.
We have done this with some animals, not with others, and have learned some tricks to feeding them. To do it, you have to have some land, and how much you can do is often dependent on how much land you actually have, and how well it grows plants.
You can plant good forage crops all over, or gather forage by hand for animals. Either way, you are looking at a wide range of trees, shrubs, vines, annuals, perennials, weeds, things from your vegetable gardens, etc.
Our cattle roamed the woods when I was a kid, and were only fed supplemental hay in the winter (during which time they also grazed on the hay fields, fertilizing them nicely). They roamed under the trees in the orchard, eating lower leaves and twigs, as well as windfall apples in the fall. They ate blackberry vines, windfall plums, ferns, and all sorts of green plants that grew wild in the woods and meadows. They snacked on clovers, wildflowers, and other things that people just do not associate with animal feed anymore.
Our goats were in a smaller enclosure and did the same, receiving supplemental feed only at milking time. Of course the trees in their pasture were wrapped with hardware cloth to keep the goats from skinning the bark off, but there were also rose bushes, and blackberry vines there.
We have fed rabbits and chickens without buying commercially formulated feeds. We bought some grains and seeds for the chickens since we could not raise them ourselves at the time. The rabbits were fed pretty much entirely from hand-foraged plants, even through the winter in a mild Pacific NW climate (It is harder to do here, partly because we don't own the land so we cannot modify it to produce what we need). Dried apple peels, from processing apples for juice, sauce, or butter, or from the dried apples, make a really nice treat for rabbits.
Pigs without commercial feed - Pigs were traditionally raised on surplus and scraps. Garden scraps, garden surplus, table scraps, butchering scraps (including bones), windfall fruit, overblown zucchini and cucumbers, squash that was getting a little too soft, and potatoes that were just a little too shriveled to eat but not needed to plant, apples from the root cellar that were going soft, etc, as well as some crops grown especially for them - mangel beets, cabbages, the twisted or split carrots, and other storable crops. In addition, the family cow helped feed the pig, surplus milk was given to the pigs, and so was the majority of the buttermilk (helps to understand what buttermilk really is) - the milk was soured to make it easier to skim the cream, and the skim milk, and the milk from the defatted cream, were both classed as Buttermilk, and nobody had a need for very much soured skim milk, so they gave that to the pigs, and it was considered to be an essential part of the diet of the pigs. Whey was also given to the pigs (you can only use so much whey!). Grain really wasn't on the list until the late 1800s and early 1900s.
I can tell you from experience that windfall apples, picked up daily for about 2 months and tossed to the pigs, can make a measurable difference in their slaughter weights.
Some regions in the old country, and here in the US, turned out the pigs into the woods where there were plentiful oaks, and the pigs fattened on acorns through the year. They rounded them up once a year, sorted out the surplus in the herd, and butchered them, and turned the rest loose - virtually no cost involved, but you ended up with feral pigs, which is why we have wild hogs running through the South, and this is not something you could do now, unless you owned a thousand or more acres, they are too hard on the forest habitats. And having feral pigs is a different thing than having them confined - they are dangerous enough in confinement when they are accustomed to your presence, rounding up ferals is a dangerous task. But if you have woods that grow nuts, you can fence off sections and turn the pigs loose there for a few days at a time so they can eat the nuts or acorns, but not long enough for them to start digging for roots and grubs and destroying the woods.
The other factor in this is that you need to time the raising of the pigs more carefully than most people do now. You buy (or your pigs are timed to birth) in the spring. The piggies are just starting to really eat as the garden comes on. By the time they are eating a lot, you are starting to get too many zucchini, some fruit that is not good enough to use, and you are butchering the spring chickens (at least, that is how it used to be timed, how they come earlier - but the slaughter scraps can be frozen to use later if needed). The pig also gets the canning and preserving scraps, so those tend to increase through part of the summer and early fall. You keep your pigs going as long as the produce and fruit and butchering scraps are coming in, and by the time they dwindle off it is cold enough to slaughter hogs.
In order to do it on as little EXPENSE as possible (which is a different thing than as little FOOD as possible), you have to be on the ball, every bit of scrap or surplus has to be used for them, you have to preserve some foods for your breeding stock to get through the winter, and you have to be living in such a way that there IS a lot of scrap (plant a big garden, save the best for you or customers and give the damaged stuff to the animals, etc).
Essentially, there are two key elements here:
1. Learning all the things your animals can eat that you can grow, and encouraging edible weeds, etc on your property.
2. Storing feeds through the winter. This takes planning. Root cellaring, barrel storage, mixed hays, grains or other feeds, etc. Lots of dried foods if you want to hang them outside to dry in the good weather, or dry them in a barn or basement.
If you can get creative about that, you have food for your animals all year around, with minimal expense.