You are not logged in.

#1 2010-04-26 14:14:09

brbornia
Member
Registered: 2009-10-26
Posts: 11

How to ignore currently installed packes in in a synchronization?

Hello.

I will install arch in a new computer, but I wanna do it as quickly as possible, so I was thinking about export the packages list of my current computer and execute a script to install them in my new computer, but if I do that only using "pacman -S" for each line of the list, several packages will be reinstalled several times and to avoid that I wanna know if there's some parameter to skip that package if it already installed, or if there is some command to only check if that package is already installed or not?

Is there a way to do what I want? Do you think it's a good idea to install the system in my new computer that way?

Thanks

Offline

#2 2010-04-26 14:49:27

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How to ignore currently installed packes in in a synchronization?

How are you creating your package list? pacman shouldn't list an installed package more than once.

Also, you don't want to run pacman -S on every package - that will install them all explicitly.

Offline

#3 2010-04-26 14:50:14

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: How to ignore currently installed packes in in a synchronization?

Make a local repo, add it on top of pacman.conf, -Syu, pacman -S $(pacman -Slq custom-repo | grep -v "$(pacman -Qq)")

Or something like that

Edit: you could replace "pacman -Slq custom-repo"  with a list made by -Qeq on the "source" box  to avoid any problems in regards to the install reason.

Last edited by Mr.Elendig (2010-04-26 14:53:37)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2010-04-26 21:23:34

brbornia
Member
Registered: 2009-10-26
Posts: 11

Re: How to ignore currently installed packes in in a synchronization?

Yes, that will work, thanks for your help.

Offline

#5 2010-04-26 21:30:27

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: How to ignore currently installed packes in in a synchronization?

brbornia wrote:

Hello.

I will install arch in a new computer, but I wanna do it as quickly as possible, so I was thinking about export the packages list of my current computer and execute a script to install them in my new computer, but if I do that only using "pacman -S" for each line of the list, several packages will be reinstalled several times and to avoid that I wanna know if there's some parameter to skip that package if it already installed, or if there is some command to only check if that package is already installed or not?

Is there a way to do what I want? Do you think it's a good idea to install the system in my new computer that way?

Thanks

pacman -Qqe | grep -Fxv "$(pacman -Qqm)" > somefile.txt

xargs pacman -S --noconfirm --needed < somefile.txt

`man pacman` would've given you --needed which was what you were asking for in the first place.

/edit: fixed install command.

Last edited by brisbin33 (2010-04-26 21:34:06)

Offline

#6 2010-04-27 01:29:26

brbornia
Member
Registered: 2009-10-26
Posts: 11

Re: How to ignore currently installed packes in in a synchronization?

Dam, I did read the man, but missed the --needed hmm

Thank you

Offline

Board footer

Powered by FluxBB