Fixing Localization settings in Ubuntu

I had some problems installing certain python, as well as system, packages due to my VPS not having proper localization settings.
The problem I was having was the following:
I did some Googling but couldn’t find anything that would work. Finally I found out that you can re-generate your localization settings by typing
sudo locale-gen "en_US.UTF-8"
This fixed all my issues and worked perfect. I finally found this out from the askubuntu forum here. I thought I would share this incase anyone ever needs help with this.