nvbn / thefuck

Magnificent app which corrects your previous console command.
MIT License
84.92k stars 3.43k forks source link

Unhandled `apt` "Packages were downgraded and -y was used without --allow-downgrades" error #1424

Open KaKi87 opened 10 months ago

KaKi87 commented 10 months ago

The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release):

The Fuck 3.29 using Python 3.11.4 and Bash 5.2.15(1)-release

Your system (Debian 7, ArchLinux, Windows, etc.):

Ubuntu Unity 23.04

How to reproduce the bug:

- Run "sudo apt upgrade -y" ;
- Get the "Packages were downgraded and -y was used without --allow-downgrades" error ;
- Run "fuck" ;
- Expect "sudo apt upgrade -y --allow-downgrades" but get "sudo apt upgrade".

The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):

I ran the expected command manually before going here so I can't try it anymore, sorry.

If the bug only appears with a specific application, the output of that application and its version:

apt 2.6.0ubuntu0.1 (amd64)

Anything else you think is relevant:

I'd also like to suggest using headings for questions in order not to need code blocks for replies so that formatting would be possible. Thanks