I have been getting warnings like below when I upgrade packages with aptitude.
Despite my previous attempt to fix this before, warnings just did not go away. After digging around a bit more, disabling SendEnv LANG LC_* from /etc/ssh/ssh_config stopped the warnings from appearing.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
# 2017-01-16 TY: Disable this to prevent "warning: Setting locale failed" related
# warnings. See http://qiita.com/networkelements/items/12e2448b75f7ff057139
# SendEnv LANG LC_*