Wrong for blocking??

My ex bf told me that he wanted me to leave him alone. So I told him I would and then I blocked him from my social media. I did that because I felt like disappearing and not giving him access to me in case he felt like speaking to me one day. Was the blocking excessive or simply unfriending him would have been enough?