Like adid and the various Somalia national army spinoffs. Was there ever a period with no actual government.
Here's a more nuanced view, but it applies circa 2015 only, which is fairly late in the war:
The idea that Somalia is completely lacking in central government is false, but the federal government’s reach is indeed inconsistent. The central government is strongest around the capital, Mogadishu, but declines quickly outside of the immediate area. But that is not to say that no governing structures exist, even if they are not central. Regional governments in Somalia operate with varying degrees of independence and effectiveness, ranging from the almost fully autonomous Somaliland region (which has sought recognition as independent state), areas dominated by the militant organization al Shabab, and other states and regions that still struggle to establish political control.
This patchwork quilt of governmental systems forms the backdrop of Somali life. It is true that the country offers lessons in the dangers associated with a lack of central government. It also shows how people respond to collective problems without government, too. In many parts of the country, society has organized itself to effectively solve collective problems and provide public goods. Somalia’s nearly ten and a half million residents maintain daily routines not too dissimilar to those in more developed countries. Basic utilities and services, such as garbage removal and clean water access, are offered by private-sector firms and small local governments fulfilling the jobs normally left to the state. One example is the energy sector in Somalia. A report by the Shuraako program of One Earth Future documented the current structure of electricity provision in Somalia, where electricity has been provided largely by a network of small independent producers. This has resulted in increasing access to electricity across the country but also high prices and inconsistent provision.
Since the fall of Said Barre’s government in early 1991, Somalia has been without a central government that has been able to exert control much beyond the capital, Mogadishu. What has emerged in its place has been a variety of entities, or informal systems, that have attempted to provide security and governance. This article cannot cover the full range of systems over the last 25 years (many have come and gone) but will try to capture the array of local authorities that have emerged. What is clear is that there are multiple paths and processes in which different entities have engaged as they have sought to create political order and, perhaps most importantly, security. Some have developed state-like formations while others more local security-based structures, such as neighbourhood watch groups. While the latter could not be compared with a state, when combined with other services such as private education, private hospitals or private water distribution, it does suggest some of the myriad of ways governance continues to occur in “ungoverned spaces.”
This article discusses in particular the "least failed" part of Somalia, namely Somaliland. I won't go into the details here, but they ended up with a police force, passports, elections, etc. Puntland is also discussed more or less in the same terms (sans passports, it seems, because they claim to be the actual Somalia). These are the two "proto-states" (the article's terminology) that emerged. There are also smaller clan-based entities name-dropped: South West State of Somalia, the Galmudug State, Azania, and Khatumo State. Not much in the way of details of their organization though. But the Islamist Al Shabaab is well described.
So it is definitely true that it had no central government, as for "no government" (in its territories) that's more debatable.
Wikipedia has this map of the situation in 2017. As you can see it looks more like a partition than no state(s) whatsoever:
But a decade before, there was a lot of instability, particularly in the south.
Alas there are no earlier political maps on Wikipedia (for the civil war). The war has been going on since the 1990s, and even before if we consider the insurgents fighting Barre, whose government had poor control of the territory. You can find a 1999 clan-based map in a Red Cross publication. I'm omitting it here because the only significant info is that (what later became) Somaliland and Puntland had a more homogenous clan structure. Actually there is a 1977 clan (ethnic) map in Wikipedia.
During the Somali civil war, there was no group, clan or association of regional leaders etc that held control over most of Somalia. General Aidid did have control in a region of the south, but not in Somaliland, and was in no way able to act as a head of government even without international recognition. There were multiple factions in the civil war, many groups (including the internationally recognised government of Ali Mahdi Mohamed) only controlled small amounts of territory. It is correct to say that there was effectively no government in much of the country.