Dnf update problems and how to solve them

One of my workstations runs Fedora for a quite long. I’ve been following practices from my previous technical job and take easy to upgrade the distro or to switch the “lates-what-ever-technology” you would imagine.

I’ve finally adopt dnf command instead of yum to manage the command lines. It has being going well but suddenly I’ve started to received this error message in the terminal:

Traceback (most recent call last):
File "/bin/dnf", line 36, in
main.user_main(sys.argv[1:], exit_code=True
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 185, in user_main
errcode = main(args)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
return _main(base, args)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 115, in _main
cli.configure(map(ucd, args))
File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 981, in configure
self.optparser.usage = self.optparser.get_usage()
File "/usr/lib/python2.7/site-packages/dnf/cli/option_parser.py", line 255, in get_usage
usage += "%-25s %s\n" % (name, summary)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 40: ordinal not in range(128)

So I decide to go back to the trusty well worker yum.

Finally I’ve found how to solve the problem, by typing this:

  1. export LANG=C
  2. dnf clean all
  3. … and then you may type dnf clean all just is case
  4. Finally, type dnf update and everything must be settled and done, and your system gonna work with dnf or yum, as you wish