A portable storage device configured to store data accessed by a host device via an interface, the portable storage device comprising: a deactivation executing part configured to perform a plurality of deactivating processes deactivating access to the data at different levels via the interface; a setting information storing part configured to store setting information which includes deactivation identifying information identifying the deactivating process and a condition under which the deactivating process is performed; a judging part configured to refer to the setting information stored on the setting information storing part, compare the condition represented by the setting information with an operation state of the portable storage device, and judge whether the condition represented by the setting information is satisfied or not; a deactivation control part configured to order the deactivation executing part to execute one of the plurality of deactivating processes identified with the deactivation identifying information represented by the setting information when the judging part has judged that the condition is satisfied; a plurality of flash memories (134a, 134b) configured to store data received from the host device; and a switch part configured to enable the host device to access one of the plurality of flash memories (134a, 134b) while the deactivation executing part performs the deactivating process on another one of the plurality of flash memories (134a, 134b), wherein the condition for performing the deactivating process is a given threshold value applied to a time-varied factor, the setting information storing part is configured to store first setting information including a first condition indicating a first threshold value having a short elapsed time, and first deactivation identifying information indicating a first deactivating process having a small data deleting range, and second setting information including a second condition indicating a second threshold value having a long elapsed time longer than the short elapsed time of the first condition, and second deactivation identifying information indicating a second deactivating process having a large data deleting range larger than the small data deleting range of the first deactivating process, and the judging part is configured to judge whether the condition is satisfied by comparing the time-varied factor time-varied in the operation of the portable storage device, with the first threshold value and the second threshold value indicated by the setting information to determine a data deleting range based on an elapsed time. a deactivation executing part configured to perform a plurality of deactivating processes deactivating access to the data at different levels via the interface; a setting information storing part configured to store setting information which includes deactivation identifying information identifying the deactivating process and a condition under which the deactivating process is performed; a judging part configured to refer to the setting information stored on the setting information storing part, compare the condition represented by the setting information with an operation state of the portable storage device, and judge whether the condition represented by the setting information is satisfied or not; a deactivation control part configured to order the deactivation executing part to execute one of the plurality of deactivating processes identified with the deactivation identifying information represented by the setting information when the judging part has judged that the condition is satisfied; a plurality of flash memories (134a, 134b) configured to store data received from the host device; and a switch part configured to enable the host device to access one of the plurality of flash memories (134a, 134b) while the deactivation executing part performs the deactivating process on another one of the plurality of flash memories (134a, 134b), wherein the condition for performing the deactivating process is a given threshold value applied to a time-varied factor, the setting information storing part is configured to store first setting information including a first condition indicating a first threshold value having a short elapsed time, and first deactivation identifying information indicating a first deactivating process having a small data deleting range, and second setting information including a second condition indicating a second threshold value having a long elapsed time longer than the short elapsed time of the first condition, and second deactivation identifying information indicating a second deactivating process having a large data deleting range larger than the small data deleting range of the first deactivating process, and the judging part is configured to judge whether the condition is satisfied by comparing the time-varied factor time-varied in the operation of the portable storage device, with the first threshold value and the second threshold value indicated by the setting information to determine a data deleting range based on an elapsed time.