According to AFP, militants captured the town in Yobe state in August last year as the group seized swathes of territory in the crisis-hit northeast.
The military announced that it had wrested back control last Saturday.
Defence spokesman Chris Olukolade said that search operations in the area led to the discovery of the bomb-making factory manufacturing improvised explosive devices or IEDs.
"A large quantity of IEDs, including those commonly used by suicide bombers were recovered from the site," he added in an emailed statement.
"The factory, which was located in a fertiliser company, has also converted some of the materials therein for production of all types of IEDs.
"Troops are still evacuating the materials which include a large quantity of suicide bomber vests from the facility to their base."
Women and young girls with explosives vests strapped to their bodies have been sent into crowded markets and bus stations, causing mass casualties.
Roadside bombs -- a tactic seen widely in Iraq and Afghanistan by Al-Qaeda-linked militants -- have also been found buried in the ground.
Olukolade said four soldiers were killed by IEDs during the operation to retake BuniYadi and the advance was delayed because the devices were planted on the road leading into the town.
Nigeria's military, assisted by soldiers from Niger, Chad and Cameroon, as well as South African mercenaries, have made major gains against Boko Haram in recent weeks.
/275