Heat +1. Then thread chaser for nut/female and wire brush for bolt thread to clean before reinserting with new thread lock.
personally , i just add a drop or two of new thread lock and put it back in ,but i am sure you must have a reason for wanting to clean it off ?
Heat or “plus gas” if trying to loosen. If removing from threads then brake or carb cleaner and wire brush.