1. An information processing apparatus, comprising: an input unit configured to input a deletion instruction of data stored in a nonvolatile memory; a determination unit configured to determine whether the nonvolatile memory has reached an end of its rewrite operating life in accordance with the deletion instruction input by the input unit; an acceptance unit configured to accept an instruction for setting a password to the nonvolatile memory in a case where the determination unit determines that the nonvolatile memory has reached the end of its rewrite operating life; and a setting unit configured to set the password to the nonvolatile memory in accordance with the instruction accepted by the acceptance unit.