Question: May one sweep the dirt and small rocks in the front yard of one’s home on Shabbat?
Answer: One of the thirty-nine forbidden works on Shabbat is building, as the Mishnah (Shabbat 102b) states, “One who builds on Shabbat, even if it is a small addition to an existing edifice, is liable for Shabbat desecration.” This prohibition is similar to one who has ignited a flame or cooked a food on Shabbat.
The definition of “building” in the context of Shabbat is not specifically building alone, such as by laying bricks, cement, and the like; rather, any repair of one’s home is included in the prohibition of building. The Gemara (Shabbat 73b) states that one who evens out earth is liable for Shabbat desecration. Similarly, the Rambam (Chapter 10 of Hilchot Shabbat) rules that one who evens out earth on Shabbat, such as by filling in a ditch, knocking over a mound of dirt, and the like, has transgressed the Torah prohibition of building on Shabbat. Thus, one who sweeps the floor of one’s home which has no flooring (such as wood, tile, or carpet) has transgressed the prohibition of building on Shabbat.
It is therefore absolutely forbidden to sweep unpaved earth on Shabbat, for while sweeping, one is certainly evening out the earth and causing it to be smooth and straight and thus transgresses the prohibition of building on Shabbat by repairing or enhancing the earth or a building.
If one sweeps an outdoor yard, it is also possible that one is transgressing the Torah prohibition of ploughing on Shabbat. It is therefore completely forbidden to sweep any unfloored or unpaved earth on Shabbat; only when the floor has flooring is there room for leniency (see Chazon Ovadia-Shabbat, Volume 2, page 277, Volume 3, page 42, and Volume 4, page 44).
Summary: One may not sweep unpaved ground on Shabbat.