

Rats, flies, fruit flies and ants: preventing and dealing with compost bin pests

A garden compost bin is a small living world: countless micro-organisms, along with worms, woodlice and larvae, work day and night to transform your waste. Among all these residents, a few visitors are distinctly less welcome: rats and mice, swarms of fruit flies, ants in large numbers.
Their presence is not inevitable. It almost always signals the wrong kind of waste, scraps left uncovered or a moisture imbalance, and can therefore be sorted out with a few simple habits. Do you have a wormery? Its visitors and remedies are a little different: you will find them in our guide Wormery pests.
Rats and mice: what really attracts them
A rodent is looking for two things: easy food and a dry shelter. A compost bin can offer both if you are not careful. What attracts it first and foremost are scraps of meat, fish and dairy products. Dishes in sauce, fatty leftovers and bread in large quantities have the same effect.
The type of compost bin matters too. An open heap is more exposed to cats, dogs and rodents than a closed bin. And a well-kept compost bin, with varied, covered additions, does not generally attract pests.
Meat and fish are, incidentally, among the types of waste on which specialists disagree. We explain why we advise against putting them in the compost bin, and what you can do with them instead, in our guide Controversial waste. The best solution for these scraps is often bokashi, which ferments them in a closed bucket before returning them to the soil.
Protecting your compost bin from rodents
A few precautions are enough to make your compost bin far less appealing:
Bury fresh waste in the centre of the heap or bin rather than leaving it on the surface. It is an effective deterrent.
Cover each addition with a good layer of brown material, around ten centimetres: dead leaves, shredded wood, straw.
Choose a closed bin with a lid that fits securely. A cheap compost bin that is poorly fitted or full of gaps lets rodents in more easily.
Lay wire mesh under the bin if the visits continue: galvanised metal mesh with small holes, spread on the ground and extending a few centimetres beyond the bin all round.
A rotary composter is another answer: its closed, raised drum keeps rats at bay, making it a good option in town, near a patio or in a neighbourhood with lots of rodents. Our Maze 180L dual-chamber rotary composter is one example. Just bear in mind that worms cannot live in it: the compost will need to finish maturing in a heap.
Willy's tipFor the mesh, choose a fine gauge, around one centimetre: a mouse can squeeze through surprisingly small openings. Bring it a few centimetres up the inside walls of the bin and remember to check the corners. Earthworms, on the other hand, pass through easily and can carry on moving up into your compost.
If, despite everything, a colony settles in for good, do not wait: empty the compost bin, move it if necessary and contact your local council or a professional.
Flies and fruit flies: cover fresh additions
A few fruit flies around a compost bin are normal, especially in summer. A swarm, however, almost always indicates too much sweet, moist fruit left exposed, or compost that is too wet. These little vinegar flies love melon skins, bruised peaches and peelings from ripe fruit.
Mix fruit waste into the top layer of the compost as soon as you add it;
cover it straight away with brown material: shredded wood, dead leaves, dry grass clippings;
check the moisture with the squeeze test, and add dry material if water runs between your fingers;
keep your peelings in the kitchen in a caddy with a lid, such as our Kaylis 7L compost bin, and empty it regularly.
If you see large flies with a metallic blue sheen, the cause is different: they are attracted by scraps of meat or fish, or by excrement. The remedy is simple: stop putting this waste in the compost bin.
Ants: often a sign of compost that is too dry
The rule of thumb is simple: a few ants, nothing unusual; lots of ants, or an actual nest, and the compost is short of water. This is a practical observation rather than a scientific rule, but it is worth checking first.
There is no need to reach for the insecticide. Water the compost while turning it, add green, moist materials (peelings, vegetable tops, thin layers of grass clippings), then check with the squeeze test. Once the moisture is restored, the ants will leave of their own accord. For other signs of compost that is too dry, see our guide Compost that smells, is too wet or too dry.
The "good creatures" to leave to their work
Before worrying about a creepy-crawly, take a good look at it: most of the residents of your compost bin are your allies. They cut up, shred and digest waste, and play a direct part in making compost.
Woodlice, small grey armoured crustaceans, feed on old leaves and plant debris;
springtails, tiny jumping white dots, and compost mites, which have nothing to do with household ones;
worms, which come up from the soil of their own accord when the compost bin sits directly on the ground;
millipedes with cylindrical bodies, which eat softened plant matter;
rose chafer larvae, large curled white grubs, which refine the material at the end of composting.
To find out more about this small wildlife, our guide Life in a wormery describes the most common residents, which are also found in a garden compost bin.
Did you know?The rose chafer larva looks very much like that of the cockchafer, but it does not attack roots: it feeds on decomposing plant waste. To tell them apart, look at both ends. The rose chafer larva has a small head and a wider rear; with the cockchafer, it is the other way round.
In a shared compost bin: common rules
In a compost bin at the foot of a block of flats or in a neighbourhood, a single unsuitable addition can attract pests for everyone. That is why the charters for these sites are often stricter than at home: in some towns, for example, meat, fish, bones, dairy products, bread and large quantities of citrus fruit are excluded from communal compost bins. Follow the list displayed on site, even if you put this waste in your own compost bin.
Always cover your addition with the dry material provided next to the bins, close the lid properly, and report any sign of rodents or any invasion of flies to the site coordinator. We explain how these sites work in detail in our guide Shared compost bins: how they work.
In summary
Compost bin pests almost always have a simple explanation: scraps of meat, fish or dairy for rodents, sweet fruit left exposed or too much water for fruit flies, and a lack of moisture for ants. Bury and cover each addition, choose a well-closed bin, add wire mesh or switch to a rotary composter if rodents persist, and keep an eye on moisture. As for woodlice, worms, springtails and rose chafer larvae, let them get on with it: they are the ones making your compost.
Scan the code or visit mouttafarm.ie/guide: all our practical guides, with links to the products mentioned.





































