The clean world of digital information is based on noisy physical devices. Landauer's principle provides a deep connection between information processing and the underlying thermodynamics by setting a lower limit on the energy consumption and heat production of logically irreversible transformations. While Landauer's original formulation assumes equilibrium, real devices often do operate far from equilibrium. We show experimentally that the nonequilibrium character of a memory state enables full erasure with reduced power consumption as well as negative heat production. We implement the optimized erasure protocols in an optomechanical two-state memory. To this end, we introduce dynamical shaping of nonlinear potential landscapes as a powerful tool for levitodynamics as well as the investigation of far-from-equilibrium processes.