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

I have an unofficial repository called haskell-core. I want to blacklist every haskell package in extra and use the packages from haskell-core instead. I don't want to use haskell packages from extra and I need it to be low maintenance. Is this possible?

EDIT: Pacman still installs haskell packages from extra if they are newer.

share|improve this question
up vote 5 down vote accepted

just put your repository above [extra] in pacman.conf. Your file should look like:

Include = /etc/pacman.d/mirrorlist

[<your custom repository>]
Server = <your repository location>

Include = /etc/pacman.d/mirrorlist

In this way your haskell packages will automatically be preferred over the official packages from extra with the same name unless those in extra have a higher version number. Be sure that your packages handle all the necessary dependencies of official haskell packages if you don't want to run into trouble. This only works if the custom packages have higher version numbers than the official ones.

Another alternative would be to add provides=('<[extra] package name') and conflicts=('<package name'>) to your PKGBUILDs and then add you repository anywhere in pacman.conf so that when you install your packages pacman will ask if you want to replace those in [extra], if they're installed. You custom packages should not have the same name of the official ones. For example, a package should be called <package-name>-custom or something like that.

share|improve this answer
Pacman still prefers extra instead of my unofficial respiratory. Is this because extra is slightly newer than my unofficial respiratory? – ArchHaskeller Apr 6 '13 at 18:39
yes, pacman prefers the first repo when the pkgver is the same or higher, otherwise it prefers the higher pkgver. You can use the opther method I added to the solution. I assumed your repo contained newer packages. For an example of this second method see this PKGBUILD that replaces `haskell-x11. – domenico Apr 6 '13 at 18:43
Are there any implications if I automated the second solution above? – ArchHaskeller Apr 6 '13 at 19:07
what do you mean with "automated"? – domenico Apr 6 '13 at 19:11
The addition of provides=('<[extra] package name') and conflicts=('<package name'>) – ArchHaskeller Apr 6 '13 at 19:56

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.