If you still have access to Lightroom on the same hard drive, you can go to help menu within Lightroom and choose Sign out.
If you do not have the access, you can simply reinstall the Lightroom Program after reinstalling your OS as the machine ID would be the same and your activation count would be overwritten.
If you face any kind of issues while activating Lightroom Program on the new hard drive, you can let me know and I will assist you further with it.
Yes, I still have access to my LR and sorry that I have made a mistake, my Lightroom is version 5.7 instead of 6.
So I don't have the signout or deactivate option. Please kindly help.
There is no deactivation process for Lightroom 5 or earlier. All you need is your serial number to install it again after you get things fixed.
Got it and many thanks.