Image by: wintersown
Maturing flower of bunching onion.
The allium family includes onion, garlic, chive, leek, and shallot:
Allow the plants to flower and do not deadhead them. They will produce globe-shaped flower balls atop a stem held over the leaves.
After the flower dries back you will see the formation of seedpods along the ends of the array that held the individual florets.
When the flower stem has browned and withered you can then assume that the seeds have matured. Cut the stem and hang it upside-down to continue to dry in a warm place for a few more weeks.
After it has thoroughly dried you may crumble the heads to release the seeds. They will be very dark greyish-brown to a deep black in color.