Abstract Squeezing is a crucial resource for quantum information processing and quantum sensing. In levitated nanomechanics, squeezed states of motion can be generated via temporal control of the trapping frequency of a massive particle. However, the amount of achievable squeezing typically suffers from detrimental environmental effects. We propose a scheme for the generation of significant levels of mechanical squeezing in the motional state of a levitated nanoparticle by leveraging on the careful temporal control of the trapping potential. We analyse the performance of such a scheme by fully accounting for the most relevant sources of noise, including measurement backaction. The feasibility of our proposal, which is close to experimental state-of-the-art, makes it a valuable tool for quantum state engineering.