On commons...P5879 there are a lot of fscked language properties
select up_value, count(up_value) as cnt from user_properties where up_property = 'language' group by up_value order by cnt DESC;
Interesting rows that I've nuked on commons
mysql:wikiadmin@db1068 [commonswiki]> DELETE FROM user_properties WHERE up_property = 'language' AND up_value LIKE '%ownwork'; Query OK, 9473 rows affected (1 min 34.18 sec) mysql:wikiadmin@db1068 [commonswiki]> DELETE FROM user_properties WHERE up_property = 'language' AND up_value LIKE '%fromgov'; Query OK, 141 rows affected (2.69 sec) mysql:wikiadmin@db1068 [commonswiki]> DELETE FROM user_properties WHERE up_property = 'language' AND up_value LIKE '%fromwikimedia'; Query OK, 416 rows affected (2.58 sec) mysql:wikiadmin@db1068 [commonswiki]> DELETE FROM user_properties WHERE up_property = 'language' AND up_value LIKE '%fromflickr'; Query OK, 439 rows affected (2.34 sec)
In https://gerrit.wikimedia.org/r/#/c/367781/ maintenance/cleanupPreferences.php we should add something like...
'DELETE FROM user_properties WHERE up_property = 'language' AND up_value NOT IN (' . implode( ' ,', Language::fetchLanguageNames() ) . ');'