How to exclude a dependency from being downloaded?

Question:

i am trying to install a lot of packages at the same time, and am getting this error at the end of the download.

"error: failed to commit transaction (conflicting files)
/usr/lib/python3.10/site-packages/magic/init.py exists in both ‘python-magic’ and ‘python-filemagic’
/usr/lib/python3.10/site-packages/magic/pycache/init.cpython-310.opt-1.pyc exists in both ‘python-magic’ and ‘python-filemagic’
/usr/lib/python3.10/site-packages/magic/pycache/init.cpython-310.pyc exists in both ‘python-magic’ and ‘python-filemagic’
Errors occurred, no packages were upgraded.
"

how do i exclude one of the 2 packages that are conflicting to complete the download successfully?

(both the "python-filemagic" and "python-magic" aren’t packages that am trying to download, i assume they are dependencies of one of the packages am trying to download but i cannot figure out which one it is either.)

errorImage

Asked By: OmarDaNoob

||

Answers:

i fixed it by adding the argument --overwrite

sudo pacman -Syyu --needed --overwrite='*' <wanted-package>

Answered By: OmarDaNoob
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.