The air strike targeting the centre in Tripoli's Tajoura neighbourhood on Wednesday (local time) also wounded 80 migrants, said Malek Merset, a spokesman for the Health Ministry. Merset posted photos of migrants who were being taken in ambulances to hospitals.
Footage circulating online and said to be from inside the centre, which houses 616 migrants and refugees, showed blood and body parts mixed with rubble and migrants' belongings.
The UN refugee agency in Libya condemned the air strike.
The fighting for Tripoli has threatened to plunge Libya into another bout of violence on the scale of the 2011 conflict that ousted longtime dictator Moammar Gadhafi and led to his death.
Hifter says he is determined to restore stability to the North African country. He is backed by Egypt, United Arab Emirates and Saudi Arabia while his rivals, mainly Islamists, in Tripoli are supported by Turkey and Qatar.
His campaign against Islamic militants across Libya since 2014 won him growing international support from world leaders who say they are concerned that Libya has turned into a haven for armed groups, and a major conduit for migrants bound for Europe.
At least 6000 migrants from Eritrea, Ethiopia, Somalia, Sudan and other nations are locked in dozens of detention facilities in Libya that are run by militias accused of torture and other human rights abuses. Most of the migrants were apprehended by European Union-funded and trained Libyan coast guards while trying to cross the Mediterranean Sea into Europe.
Read more: