If Nigeria remains diligent the could very well keep the Boko Haram at bay. They crushed them once and ran them out. Now they just need to stand their ground and not relax. Any remnants must be dealt with as well. The Boko Haram suffered a devastating blow and Nigeria has the advantage.
As the United States learned with the "War on Terror," terrorist groups are very difficult to defeat. Therefore, fragmented members and groups of Boko Haram may still carry out attacks. However, it seems like this defeat will go a long way towards getting rid of Boko Haram and minimizing the group's future effects on Nigeria.
This is not the first time that the Nigerian government have declared that Boko Haram have been defeated. While the number of attacks by the terrorist group have fallen and their camps have been destroyed, they have still been responsible for 1000 deaths this year and a number of serious attacks. It is far too soon to say that they have been totally defeated.
Nigeria has been unstable for decades. And unfortunately, I think it will be in turmoil for decades to come. By forcing out Boko Haram out of power, they have one the battle but not the war. Yes, it is an important first step. Now they must set up a stable and effective government which is a lot easier said than done.