Tuesday, October 27, 2015
How To Downgrade Proposed Repository Packages In Ubuntu
Enabling the proposed repository in Ubuntu is usually not a good idea because it's a testing area for updates so things can break. If you've enabled the proposed repository and something broke, here's how to revert the changes by downgrading the packages installed from the proposed repository.
Revert package upgrades from the Ubuntu proposed repository
1. Firstly, launch Software & Updates (or Software Sources, depending on the Ubuntu version you're using) from System Settings and on the Updates tab, disable "Pre-released updates (proposed)":
2. Next, we'll have to pin the packages from the Ubuntu repositories: for stable, updates, security and backports we'll use a priority greater than 1000 which will cause the packages from these repositories to be installed even if this constitutes a downgrade and for the proposed repository, we'll set a pin priority of less than 0 which prevents the packages from being installed.
To do this, create a file called "99-downgrade-proposed" under /etc/apt/preferences.d/ - I'll use Gedit below:
gksu gedit /etc/apt/preferences.d/99-downgrade-proposed
And in this file, paste the following:
Package: *
Pin: release a=saucy
Pin-Priority: 1001
Package: *
Pin: release a=saucy-updates
Pin-Priority: 1001
Package: *
Pin: release a=saucy-security
Pin-Priority: 1001
Package: *
Pin: release a=saucy-backports
Pin-Priority: 1001
Package: *
Pin: release a=saucy-proposed
Pin-Priority: -1
Replace "saucy" with your Ubuntu version in the file above. Then save the file.
3. Now you can start the downgrade by using the commands below:
sudo apt-get update
sudo apt-get dist-upgrade
Make sure "dist-upgrade" doesn't remove any important packages. If everything looks ok, proceed with the downgrade.
You'll have to keep in mind that it's possible to encounter "error processing packageX ... trying to overwrite fileX which is also in package Y" dpkg errors - see how to fix them HERE.
4. After downgrading, you can remove the file created under step 2:
sudo rm /etc/apt/preferences.d/99-downgrade-proposed
Labels:
downgrade,
fix,
tips n tricks,
Ubuntu
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment