Android: Flashing stock firmware
Grab stock firmware
Stock firmwares can be grabbed from here: https://samfw.com/
In Australia, at least for the Samsung S6, the country code XSA is the unbranded one. There are other firmwares for carriers such as Optus and Telstra that contain bloatware among other things. Also oddly enough the model of the phone seems to be SM-G920F or SM-G920I. Both appear to be interchangable. So while the phone lists its model as F the only Australian firmwares that could be found were for the model I.
The firmware that was used was the SM-G920I XSA.
Odin
Samsung devices are recommended to use the Odin flashing tool developed by Samsung themselves. Sadly, it is only Windows.
Extract the firmware zip, launch Odin and place the AP, BL, CP and CSC files in there respective slots.
Restart the phone in download mode by pressing and holding Volume Down + Power + Home, (this may be different on other phones) until the phone reboots into a blue screen.
Follow the prompts and when ready connect the phone to computer, then click the start button.
The phone should now be reset to stock firmware.