Due to my setup I cannot make use of pacman to actually install packages, however if I install a package from the Arch repositories manually by downloading and extracting it, eg:

wget http://mirrors.kernel.org/archlinux/core/os/x86_64/curl-7.26.0-1-x86_64.pkg.tar.xz
tar -Jxvf curl-7.26.0-1-x86_64.pkg.tar.xz -C /

...is there a way to make pacman aware of it so that it can control future updates or un-installation?


If you're downloading packages manually, then it's easiest to install them with pacman:

pacman -U curl-7.26.0-1-x86_64.pkg.tar.xz

That way they'll also get tracked like any other package. If the reason for this mode of operation was a broken system, just run pacman afterwards (when you can) and the reinstallation will take care of tracking.

| improve this answer | |
  • And if I can't use pacman? – Jivings Jul 2 '12 at 13:20
  • at minimum an entry under /var/lib/pacman/local, but that looks pretty inefficient to parse, so I bet it stores more info elsewhere. Would have to check its source. – lynxlynxlynx Jul 2 '12 at 13:29
  • also check out the "-r, --root <path>" option, since you may be able to use the host's pacman to do this. – lynxlynxlynx Jul 2 '12 at 13:32
  • I'm guessing there's a database entry somewhere, but I can't seem to find the information that I want. – Jivings Jul 2 '12 at 18:53
  • looks like it doesn't and the database is the flat file based thing under /var/lib/pacman. That's what the man page suggests and running strings on the binary doesn't show any other viable path default. – lynxlynxlynx Jul 2 '12 at 18:58

No. If you want pacman to manage the program for you, you have to install it with pacman.

curl is in core, why don't you just pacman -S curl?

| improve this answer | |
  • The reason I can't do this is that I'm attempting to install packages in a mounted Arch image of a different architecture without emulating it. Thus I cannot use pacman. – Jivings Jul 2 '12 at 11:12
  • 2
    It would have been helpful to have included that information in your question... – jasonwryan Jul 2 '12 at 17:45
  • I thought I had made it pretty obvious that using pacman wasn't viable. Otherwise I would have just used pacman. – Jivings Jul 2 '12 at 18:52
  • I disagree: your question is clearly in the past tense - once a package has been installed manually, can pacman be made aware of it? There is nothing in your question that suggests, implictly or explicitly, that pacman is not available to you. – jasonwryan Jul 2 '12 at 19:03
  • 1
    People do all sorts of things with their machines... I can only go on the information presented. Thank you for considering it. – jasonwryan Jul 2 '12 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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