How to selectively upgrade from more PPAs?

Asked by Uqbar

I have added a PPA (PPA#1) for a more up to date package (PKG#1).
I need then to install another package (PKG#2) and so I added another PPA (PPA#2).
PPA#2 also brings a version of PKG#1 which I don't want to install.
Now, when I run "apt-get upgrade", the system tries to upgrade PKG#1 from PPA#2.
I don't want to do so. I want to keep PKG#1 from PPA#1 and PKG#2 from PPA#2.
Is there a way to do so somehow "automatically"?
TIA.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#1

Hi ,

I don't know for an automatically way , but you can hold any package with dpkg . (manually)

eg :

If you want to hold firefox , if you want to not update - upgrade firefox you apply below command to a terminal (ctrl+alt+t)

====================================
echo firefox hold | sudo dpkg --set-selections
====================================

you can see the state of package firefox with below command

========================
dpkg --get-selections firefox
========================

the result must be
======================
firefox hold
======================

Thanks

Revision history for this message
Uqbar (uqbar) said :
#2

Thanks NikTh.
What I actually want to do is to upgrade PKG#1 only from PPA#1 or, at least, to block any update of PKG#1 from PPA#2.

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#3

Hi ,

and sorry for misunderstood.

You can disable temporally the PPA#2 (un-tick it from software-sources) and make your upgrade(PKG#1 from PPA#1) , then you can enable again PPA#2 and hold the package as show you on #1st answer.

Sorry but i cannot thing another trick.

Thanks.

Can you help with this problem?

Provide an answer of your own, or ask Uqbar for more information if necessary.

To post a message you must log in.