This talk will survey old and recent results on the local controllability of control systems modeled by ODEs, focussing on results stated using Lie brackets of the vector fields defining the dynamics. We will propose a unified approach to determine and prove obstructions to local controllability. This approach relies on a recent Magnus-type representation formula of the state, a new Hall basis of the free Lie algebra over two generators and Gagliardo-Nirenberg interpolation inequalities. This approach allows to recover the known necessary conditions, but also to prove a conjecture of 1986 due to Kawski and many other new necessary conditions. Finally, we will see how these results translate for PDEs. This is a joint work with Frederic Marbach and Jeremy Le Borgne.