Yes, initializing the PS4 will restore it to its factory settings and delete all data. Make sure to back up your important files before performing this step.