- Ensure that no .pacnew files exists in the system
- Get the list of duplicated package entries, store it in a file named
duplicateNames.txt
- Execute this script as root
extraEntries="`\
for name in $( cat duplicateNames.txt ) ; do
ls $localDb | grep $name | sort | sed 1d
done
`"
cd /var/lib/pacman/local
rm -rf $extraEntries
- Perform a full system upgrade, expect some errors
- Deal with eventual .pacnew and .pacsave files
- Perform another full system upgrade to ensure everything is fine