Is it safe to delete SSH keys?

~/.ssh · Do not delete by hand

What it is

Your SSH private keys, known hosts and config.

Can you delete it?

No, not by hand. Keys that are not backed up cannot be recovered; you would lose access to servers and git hosts.

How to clean it safely

  1. Leave it alone. It is tiny.

How big is it on your Mac?

This read-only command prints its size and changes nothing:

 Terminal
du -sh ~/".ssh" 2>/dev/null

Step-by-step guide: Developer caches on a Mac →

Questions

Is it safe to delete ~/.ssh?

No, not by hand. Keys that are not backed up cannot be recovered; you would lose access to servers and git hosts.

Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free to download, no account, no ads.

Download for Mac