A habit that I have had for a long time is rebooting my computer after handling sensitive information. My reason for doing this is to prevent attacks against my computer's memory.

An example of this would be if I unlocked my PGP key or SSH keys, or perhaps used my password manager. As soon as I am done using them, I would reboot in order to make sure that any residual data is cleared from memory.

I am aware that rebooting doesn't necessarily wipe the memory fully, it just feels better to do it (perceived security).

Is there really any point in doing this?

I'm using Ubuntu/GNOME Keyring.



1 Answer 1


No, it doesn't. The value might still be stored even through reboot(the physical nature of RAM leads to this). While user level applications will not receive access to the memory(it will be zeroed out when allocated), any compromise that can read the raw RAM will still be able to find it.

HOWEVER this is the wrong question to ask. Really the problem is if you're compromised to that extent, it's not your system anymore. They could sit back, relax, and slowly siphon the information as you use it and you may never know. At that point rebooting or even shutting down and waiting for RAM to clear won't do anything. They already have it.

  • Thanks for your reply. What about programs that are not designed to be secure, such as grep? For example, if I am handling keys and I use grep to filter something out, would grep unload it from memory just as GnuPG would?
    – jamieweb
    May 12, 2017 at 20:40
  • Once a thread in Linux is done, it's memory is freed(unless it's leaky... which grep isn't, and I'm pretty sure it doesn't write to disk either) May 12, 2017 at 20:50
  • When memory is freed, is it zeroed out or is there some other process to destroy the data there?
    – jamieweb
    May 12, 2017 at 20:55
  • When allocated memory is freed it's not zeroed out, unless the app takes care about it.
    – VovCA
    May 12, 2017 at 22:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .