Restore MyBookLive firmware back to factory defaults

I’ve done some 3rd party modding in the past and added/removed some packages via SSH and I was wondering, how do I restore it back to the state of when I purchased the NAS. It was the original WD firmware with miniDLNA (not the Twonky Media server) .
I’ve done a factory restore but doesn’t that just format the hard drive? Does it restore the firmware also?

Reset button? Flashing on a new firmware from the WD Support site? I suppose uploading a new firmware would put it in to a clean state.