How can I reset SSD on MacBook Air I changed the motherboard of a MacBook Air A1465 11" mid 2013 because the previous one had a problem with the RAM. 
I boot the device in recovery mode in order to install the OS but the SSD is not recognised by the disk utility, so I search online and I find that I can see if the terminal recognises the SSD, in fact it does.
I use the command diskutil list and It appears a list of disks with my SSD in it. 

Then I try to use the commands "diskutil eraseDisk JHFS+ mySSD /dev/disk22", "diskutil eraseDisk /dev/disk22", "diskutil partitionDisk /dev/disk22 GPT JHFS+ New 0b" and each time the process starts but after a while I receive a Error saying: "Error: -69877: Couldn't open device". After this error the disk disappears from the disks list.

I found out that when I use the command "diskutil unmountDisk /dev/disk22" I can actually see the disk in the disk utility interface, but when I try to erase it as I did before, the same error occurs.
Some disks (like Transcent Jetdrive disks) need specific drivers and do not function under and OS older than 10.12.. Try and boot into the different options for recovery (like Command-R / Option-Command-R / Shift-Option-Command-R) and see if the disk is recognized in any of the versions.

Apple gear boots from external drives easily so you can always get a usb connector to test if the drive will work and do an erase install. Only when you have the OS loaded, put the drive in the machine. 


https://support.apple.com/en-us/HT204904