As pointed out, a lot of areas could be kept for longer.
For example, let's not forget that Gabon WANTED to stay French and be made a département but it was refused. There was a real will from France to let the colonies go (Correze rather than Zambeze).
That said, let's say the French want to keep them.
- No Dien Bhien Phu, or at least not like this
DBP was a strategic blunder because it happened at the same time as the peace conference. It was however a success for what it wanted to achieve: bleed the Vietcong and drain them away from Hanoi. So either the French disengage early in the war for a nice and friendly Union Indochinoise or the French fight on after DBP and a compromise is made with the Viet Minh.
Ho Chi Minh was not a communist fanatic, he was a nationalist and could be reasoned with, but the whole war of Indochina was in effect a war of colonisation as the French had been completely ousted by the Japanese. There was no more French presence and the whole country had to be reconquered.
If Indochina doesn't end on DBP, it doesn't give the Algerians any bad idea.
- Better management of Algeria
Algeria had some long standing issues of course, with being an integral part of France populated by subjects of the empire rather than citizens. This became even worse after WWII when Algerians fought for France without real compensation. Then France fell and the Algerians saw it could bleed, and then DBP and they saw France could be vainquished by colonials. Anyway.
Until 1954 the FLN was pretty inocuous and at several times during the war, there was a real strategic victory over them (the ligne Maurice after 1958 helped a lot), so a government could in theory manage everything better, be strong enough to overpower the pied noir political weight without actually causing a civil war and get some concessions going.
Ok, so you're in 1962, all else has failed and you're IOTL. Algeria is now independant and we have to decide what to do with the massive pied-noir population. Then, the OAS starts a campaign of bombing which ruined the whole thing and forced the rushed emigration of the pied-noirs (a very traumatic memory for many of them). If the OAS is dismantled, that doesn't happen and decolonisation can be more peaceful, more long term.
Surely something else could be done for the African colonies. Even though, generally speaking, giving citizenship to veterans would have probably helped. They shed their blood for France and it's a great injustice they weren't properly rewarded.
Then again, people in France didn't care much about the colonies. Who in France cares about Nouvelle-Calédonie for example? Does it help the prestige of France? Do people remember it's technically French? It's effectively a protectorate these days, same as a lot of French Polynesia, but people don't care about it, I think it gives us a good idea of how the Empire was perceived in France. Even Algeria was "something else" and foreign, hence the racism that welcomed the pied-noirs in France after 1962