I have a small wooden shed in my back yard that needs to be torn down, and for the most part, I can handle it fine. However, I have one concern about the cleanup afterwards: how can I make sure the nails get cleaned up thoroughly so my kids and pets don't step on them? I've thought of a magnet to sweep the yard, but the ones I've found need to be really low to the ground and I've not seen them be effective, especially as I'm not sure these nails are ferrous.
Since you are planning to do the teardown yourself, you could lay a tarp or sheets of plywood to make a place for nails to not get lost in the grass/dirt in the process of tearing it down - or remove sections you can carry to a driveway or patio for further disassembly where nail cleanup is easy. Take your time in the "teardown" process and you'll save it back in the "not having to gather nails that flew everywhere" process.
For the most part, unless they are stuck through a piece of wood, nails lay down flat on the ground and don't actually poke people who step on them before they rust quietly away. Every person I know who has stepped on a nail (meaning gotten a puncture wound from that) stepped on a nail in a piece of scrap lumber. Roofing nails do have a higher level of hazard due to large heads, but are mostly a risk to the back tires of cars (or the front tires of cars reversing) as they will often briefly stand up after getting run over by the tire that comes first, and poke the tire behind before falling over again.
In addition to other answers, such as laying down a big tarp before starting the work, using a big magnet after, etc. go out after dark with a strong flashlight and sweep the area, possibly from multiple angles. Take some photos with a bright flash and zoom in to look for bright spots. The nails may have spots which are much more reflective than whatever dirt or grass they land in.
I've thought of a magnet to sweep the yard, but the ones I've found need to be really low to the ground and I've not seen them be effective, especially as I'm not sure these nails are ferrous.
I've had two roofs replaced and both times they did a visual cleanup followed by a thorough magnetic sweeper. While there are some crazy expensive ones, these pros were using the same cheap model Harbor Freight sells ($13 at present). It's literally a magnet on wheels with a stick. Cheap and effective if you want to get more of them up.
The devices to use are called magnetic sweepers. Can be hired if they are not to be used frequently.
Simply do your best to not drop nails while disassembling. When pulling a nail you can generally provide control by holding it. Should be possible regardless if you're using a hammer, crowbar, bootpinch pliers, or whatever prying tool you have.
You can clip a bag or pouch to your waist and that provides a convenient handy place to put all nails you pull out. Another option is an old tin with a hard drive magnet inside sitting nearby, but these risk falling over and off dwangs/nods and spilling anyway.
Lastly, your shed is likely to have a dead area underneath. Nails and rubbish are surprisingly visible when lying on flat dead soil. A careful emu parade will identify anything lying there. If there's grass nearby, your lawnmower will locate nails with a clang, guaranteed.