Skip to content

Instantly share code, notes, and snippets.

@vwbusguy
Created June 8, 2019 04:50
Show Gist options
  • Select an option

  • Save vwbusguy/41595b50f6ff3e46a5951c844eb0d3a3 to your computer and use it in GitHub Desktop.

Select an option

Save vwbusguy/41595b50f6ff3e46a5951c844eb0d3a3 to your computer and use it in GitHub Desktop.
Remove duplicates after a botched dnf upgrade
# Use at your own risk! You should try `dnf remove --duplicates` first. Use this as a last resort.
sudo rpm -e --nodeps $(sudo dnf check 2>/dev/null | grep duplicate | cut -f1 -d' ')
@skalwaghe-56
Copy link

Use dnf4, not only dnf, as dnf5 does not support duplicates anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment