Mac Re-install the OS
External
Internal
Re-install with Data Deletion
El Capitan: Command + R while restarting.
Other: Command + Option + R while restarting.
OS X Utilities -> Disk Utility
Reinstalling without explicit deletion of the partition will upgrade and preserve the data.
First delete the partition from Disk Utilities: macOS Utilities → Disk Utility → Select Internal → <Partition Name> from the left tab. Usually the partition is named "Macintosh HD" → Erase → Specify the new name and the format: APFS (Case-sensitive). It is OK to leave the name as it is "Macintosh HD", this will be also the name of the new partition → Erase. The process should end with a message similar to "Erasing "<Old Partition Name> and creating "<New Partition Name>" → Done.
Then go back to macOS Utilities and install.
Adding a new volume to the container
Apple File System (APFS) is preferable, as it's the newest and optimized for SSDs.
Select the container disk or "APPLE SSD ... MEDIA".
Add a new volume with the + icon.
Name
APFS Case Sensitive
Installation
Then go back to OS X Utilities -> Reinstall OS X.
The computer must be connected to the Internet (wire or wireless): Utilities -> Network Utility.
If I get "The recovery server could not be contacted", it is probably because the time is out of sync, so go to Utilities -> Terminal and
ntpdate -u time.apple.com
"Reinstall OS X".
Select the drive -> Install.