A single bit memory system is made with a brownian particle held by an optical tweezer in a double-well potential and the work necessary to erase the memory is measured. We show that the minimum of this work is close to the Landauers bound only for very slow erasure procedure. Instead a detailed Jarzynski equality allows us to retrieve the Landauers bound independently on the speed of this erasure procedure. For the two separated subprocesses, i.e. the transition from state 1 to state 0 and the transition from state 0 to state 0, the Jarzynski equality does not hold but the generalized version links the work done on the system to the probability that it returns to its initial state under the time-reversed procedure.