Follow the instructions below.
1.Turn off your galaxy S6.
2. Press and hold the volume up button, home button, and power button at the same time until the screen shows an Android Robot.
3. Use the volume up/down buttons to navigate the manu, and the power button to confirm selections, find and select the Wipe Data/Factory Reset option.
Scroll down to "Yes, delete all user data", and press the power button to confirm.
4. Reboot your galaxy S6