Correct me if I am wrong; but it is my understanding that all APPOINTED bureaucrats serve at the discretion of the Chief Executive and can be terminated at any time, for any reason.
That is pretty much what Bill Clinton did when he became president.
The time to do it is at the beginning of a new administration.
George Bush didn't clean house the way Clinton did and he was plagued by recalcitrant Clinton holdovers for his entire administration. In 2006 he dismissed six attorneys in the Justice Department and there was a firestorm of protest from democrats.
Regarding Obama: there were some articles posted recently about how Obama has been intentionally loading the bureaucracies with "his" people in positions that will be protected from dismissal .by the civil service rules and the employees union.
I believe there were some statements by Valerie Jarrett that they were building protection to ensure that the next president could not easily undo Obama's changes and policies.
Of course he cannot protect higher level appointees after he leaves office but if the rank and file and high level civil service positions are mostly Obama loyalists it becomes difficult for a successor to change the direction of the bureaucracy.
Look at the Sate Department as an example. It has a liberal/leftist culture that seems to change little no matter which party occupies the White House.