Towards Safer Large Language Models through Machine Unlearning