Skip to content

Instantly share code, notes, and snippets.

@dkosmari
Created March 4, 2018 19:52
Show Gist options
  • Save dkosmari/959334fe0759e1ad22d2e589d7a15fb2 to your computer and use it in GitHub Desktop.
Save dkosmari/959334fe0759e1ad22d2e589d7a15fb2 to your computer and use it in GitHub Desktop.
Script to downgrade mga7 from a Mageia 6 install, mostly automated.
#!/bin/bash
for package in $(rpm -qa --queryformat "%{NAME}^%{VERSION}^%{RELEASE}^%{ARCH}\n" | grep "mga7")
do
IFS="^" read -a fields <<< "$package"
name=${fields[0]}
echo "downgrading $name"
urpmi --auto --downgrade "$name" || exit 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment