diff --git a/thefuck/rules/dnf_no_such_command.py b/thefuck/rules/dnf_no_such_command.py index 579f5781..8f1f283c 100644 --- a/thefuck/rules/dnf_no_such_command.py +++ b/thefuck/rules/dnf_no_such_command.py @@ -30,8 +30,11 @@ def _get_operations(): @sudo_support def get_new_command(command): - misspelled_command = regex.findall(command.output)[0] - return replace_command(command, misspelled_command, _get_operations()) + if misspelled_command == 'uninstall': + return [command.script.replace('uninstall','remove') + else: + misspelled_command = regex.findall(command.output)[0] + return replace_command(command, misspelled_command, _get_operations()) enabled_by_default = dnf_available