Compost

Sims can collect and use compost for gardening in The Sims 2: Seasons and The Sims 3.

The Sims 2: Seasons
Compost in The Sims 2: Seasons is produced inside compost bins and allows Sims to produce free homemade fertilizer for crops.

Compost bins can be purchased in the "Garden Center" section of build mode, and cost §150. Compost bins initially start out empty, with 30 available units. If a compost bin with available space is on the lot, clicking on a pile of trash, a trash can or compactor with trash in it, a newspaper, an existing crop, or a deceased garden plant will provide the option "Compost", which will add the item to the nearest compost bin. Different items will contribute a different amount of compostable material to the bin. Every two units of compostable material will produce one unit of fertilizer. If there is only one unit of compostable material inside the bin, no fertilizer will be produced until more compostables are added. Each unit of fertilizer takes 6 hours to produce.

Fertilizer is stored inside the bin until it is used to fertilize a garden plot. Each unit of fertilizer fertilizes one garden plot.

The amount of fertilizer produced is unique to each bin — a lot can have multiple bins, and each one has their own storage capacity. Therefore, fertilizer can be transferred from lot to lot by placing the bin in a Sim's inventory, and any fertilizer in the bin will be lost if the bin is sold.

The Sims 3
Compost did not return in The Sims 3 in the same way as The Sims 2: Seasons. Sims can directly use food or fish as fertilizer for gardens. Players can download the SwiftGro Gardening Station from The Sims 3 Store, which includes a composter. The composter will automatically convert any food scraps placed inside of it into fertilizer, which will automatically fertilize any plots under it.