Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I force remove a package in Arch with pacman while other packages still depend upon it.

pacman -R perl-libwww                                                               
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: perl-app-cpanminus: requires perl-libwww>=5.828
:: perl-app-pmuninstall: requires perl-libwww
:: perl-app-sd: requires perl-libwww
:: perl-catalyst-action-rest: requires perl-libwww>=2.033 
:: perl-catalyst-runtime: requires perl-libwww>=1.64
:: perl-cpan: requires perl-libwww
:: perl-cpan-mini: requires perl-libwww
:: perl-cpan-uploader: requires perl-libwww
:: perl-feed-find: requires perl-libwww
:: perl-http-body: requires perl-libwww
:: perl-http-request-ascgi: requires perl-libwww
:: perl-module-cpants-analyse: requires perl-libwww
:: perl-module-install: requires perl-libwww>=5.812
:: perl-net-trac: requires perl-libwww
:: perl-net-whois-raw: requires perl-libwww
:: perl-prophet: requires perl-libwww
:: perl-rt-client-rest: requires perl-libwww
:: perl-uri-fetch: requires perl-libwww
:: perl-www-mechanize: requires perl-libwww
:: perl-xml-atom: requires perl-libwww
:: perl-xml-feed: requires perl-libwww

basically LWP 6 split a whole bunch of packages, and I need to remove it so I can reinstall it.

share|improve this question
There is no equivalent of apt-get's --reinstall flag? – Faheem Mitha Mar 27 '11 at 15:41
@faheem considering that arch hasn't released libwww 6 yet... even if there was it wouldn't work right in this scenario – xenoterracide Mar 27 '11 at 15:44
@xenoterracide: Sorry, I didn't follow your response at all (I assume libwww is something to do with the package you are trying to install) but please don't feel you need to explain on my behalf. :-) – Faheem Mitha Mar 27 '11 at 15:47
@faheem it's LWP. but we can normally just reinstall a package by requesting it's install again... that doesn't help in this case though because it's non in arch repo's and I need to uninstall this and upgrade it without using arch repo's, and since the package was split, I had file conflicts. – xenoterracide Mar 27 '11 at 15:51
@faheem also please note that Arch is not debian, and have no idea how debian's apt-get --reinstall works. – xenoterracide Mar 27 '11 at 15:51
up vote 38 down vote accepted

You should be able to reinstall the package with a simple:

# pacman -S perl-libwww

This will only remove perl-libwww:

# pacman -Rdd perl-libwww

Please notice the double -d in the command, if you use --nodeps you have to specify that twice too or combine it with a -d like:

# pacman -R --nodeps --nodeps perl-libwww
# pacman -Rd --nodeps perl-libwww

This removes all the packages which depend on perl-libwww:

# pacman -Rc perl-libwww

From pacman's man page:

   -d, --nodeps
       Skips dependency version checks. Package names are still
       checked. Normally, pacman will always check a package’s
       dependency fields to ensure that all dependencies are
       installed and there are no package conflicts in the
       system. Specify this option twice to skip all dependency
   -c, --cascade
       Remove all target packages, as well as all packages that
       depend on one or more target packages. This operation is
       recursive, and must be used with care since it can remove
       many potentially needed packages.
share|improve this answer
google guided me here. thank you for the double d – Jan-Stefan Janetzky Mar 23 '13 at 9:00
+1 thanks for -Rc also, more info in Arch Wiki – vladkras Sep 1 '13 at 6:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.