Ubuntu – How to get a repository to override all other repositories, for all software in that repository

aptpparepositoryupgrade

  1. How do I get a specific repository to override all other repositories, for ALL software in that one repository? (At all times, no matter what any other repository does.)
  2. After solving question 1, what is needed to get the system back to the original state (regarding LibreOffice, see Background).

Desires:

  • All solutions are from the command line.
  • You actually use, or have used, the solution you’re giving. (see Reference Notes)

Background:

Official 14.04 recently updated LibreOffice, causing the official repositories to install over and override the LibreOffice PPA, error message is:

# apt-get update
# apt-get upgrade

... snip ...

You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libreoffice-calc : Depends: libreoffice-base-core (= 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0) but 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1 is installed
                    Depends: libreoffice-core (= 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0) but 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1 is installed
 libreoffice-core : Breaks: libreoffice-calc (< 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1) but 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0 is installed
                    Breaks: libreoffice-draw (< 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1) but 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0 is installed
                    Breaks: libreoffice-impress (< 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1) but 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0 is installed
 libreoffice-draw : Depends: libreoffice-core (= 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0) but 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1 is installed
 libreoffice-impress : Depends: libreoffice-core (= 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0) but 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1 is installed
E: Unmet dependencies. Try using -f.

System will now not update anything until this is resolved.

Reference Notes:

Based upon How to only install updates from a specific repository?, pinning is not the answer. APT preference may be, but I’m highly hesitant to use examples found as they contradict each other and even the Debian wiki for it:

This page has been written by ZugSchlus, who not even remotely grasps
the concept of pinning. So, please take the words "probably", "needs
to be verified" and similiar wordings literally, and document your
findings (may they be "this page is right" or "this page is wrong",
optionally "this page is wrong because") here.

Further information at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1722932

Best Answer

So, after some more experimentation and learning, I think that I have an answer; don't revert system to original state; update the broken bits instead. Both Ubuntu and LibreOffice bugs were being 'Resolved' as 'It's their fault'!

Necessity is the mother of invention...

Solution in fellow Noobspeak:

  1. Run Synaptic Package Manager If not sure how, press the Windows/Super key then type Synaptic and click the appropriate icon
  2. Enter your password when prompted
  3. Click On The 'Status' button. Above that, select 'Broken Dependencies'
  4. To the right, Select all four affected LibreOffice Packages
  5. Right click them and choose 'Mark For Upgrade' option
  6. Click the big Apply button, above.

Unless the tiger is hiding, waiting to bite my hubristic backside, I think that this solves it. Tell me if I'm giving stupid advice! Thanks.

If it hasn't worked for you, perhaps you'd deseleted the LibreOffice PPA in the Depositary List. Reenable it and start again.

Related Question