Tips: Arch Linux: How to resolve “error: duplicated database entry ” ” error message


Follow the below steps to resolve the issue,

check for versions in local folder

ls /var/lib/pacman/local/ | grep <pkgname>

You should see more then one version mentioned as below

bashank@mayapc1 pkg]$ ls /var/lib/pacman/local/ | grep
bash-4.3.024-1
bash-4.3.027-0.1

now delete (or move them out of local folder) all the older versions from local folder

rm -rf /var/lib/pacman/local/<old_package>

example:

rm -rf /var/lib/pacman/local/bash-4.3.024-1

RPM Interview Questions


Q: How to install packages with all the dependency packages if all the packages are available at a common repository?
Ans : rpm –ivh  –aid packagename.

Q: How to check, where a particular package installed it’s configuration files.
Ans : rpm –qc packagename.

Q: How to check the change log of the installed package.
Ans : rpm -q –changelog packagename.

Q: How to check, where a particular package installed it’s doc files.
Ans : rpm -qd packagenme

Q: How to check all the files installed by package?
Ans : rpm -q –filesbypkg packagename

Q: How to check the version of files installed by a package
Ans : rpm -qi packagename

Q: How to check the dependencies for a particular packages i.e. Required libraries packages etc.
Ans : rpm -q -R packagename.

Q: How to upgrade the packages which are already installed on to the linux box.
Ans : rpm -F install options packagename.

Q: What is the command to update only the rpm database.
Ans : rpm -i –justdb packagename

Q: What is the command to check whether a particular package installation would be successful but would not actually install the package.
Ans : rpm -ivh –test packagename

Q: How to check that a particular file belong to which package
Ans : rpm -qf filename

Q: How to list files in  a package
Ans : rpm -ql packagename

Q: How to verify whether the files installed by package are intact or been tampered/corrupted.
Ans : rpm -qs packagename

Q: What is the command to create a new RPM Database
Ans : rpm –initdb

Q: What is the command to rebuild the RPM Database
Ans : rpm –rebuilddb