How can I revert back from an upgrade to the Proposed repository?
I mistakenly enabled the Pre-release updates (natty-proposed) repository and then upgraded all packages.
How can I undo this?
Here are the test results from @enzotib's instructions and the test results from my instructions.
11.04 upgrade repository uninstall
add a comment |
I mistakenly enabled the Pre-release updates (natty-proposed) repository and then upgraded all packages.
How can I undo this?
Here are the test results from @enzotib's instructions and the test results from my instructions.
11.04 upgrade repository uninstall
1
The test results pastebins are dead.
– enzotib
Aug 23 '13 at 8:30
add a comment |
I mistakenly enabled the Pre-release updates (natty-proposed) repository and then upgraded all packages.
How can I undo this?
Here are the test results from @enzotib's instructions and the test results from my instructions.
11.04 upgrade repository uninstall
I mistakenly enabled the Pre-release updates (natty-proposed) repository and then upgraded all packages.
How can I undo this?
Here are the test results from @enzotib's instructions and the test results from my instructions.
11.04 upgrade repository uninstall
11.04 upgrade repository uninstall
edited Apr 13 '17 at 12:25
Community♦
1
1
asked Aug 31 '11 at 17:17
ændrükændrük
41.8k61194339
41.8k61194339
1
The test results pastebins are dead.
– enzotib
Aug 23 '13 at 8:30
add a comment |
1
The test results pastebins are dead.
– enzotib
Aug 23 '13 at 8:30
1
1
The test results pastebins are dead.
– enzotib
Aug 23 '13 at 8:30
The test results pastebins are dead.
– enzotib
Aug 23 '13 at 8:30
add a comment |
6 Answers
6
active
oldest
votes
Here's a more general way to revert from locally installed packages, proposed and backports packages to the stable+updates channel. While the other answers are correct and work in a similar way, I think this is a more elegant approach.
- Make sure you removed the entries of
-proposed
or-backports
in your/etc/apt/sources.list
and/etc/apt/sources.list.d/*
files.
Add an apt-preferences file, e.g.
/etc/apt/preferences.d/99-back-to-stable-updates
containing (forprecise
here - replace with your version):
Package: *
Pin: release a=precise
Pin-Priority: 1001
Package: *
Pin: release a=precise-updates
Pin-Priority: 1001
Package: *
Pin: release a=precise-security
Pin-Priority: 1001
Package: *
Pin: release a=precise-proposed
Pin-Priority: -10
Package: *
Pin: release a=precise-backports
Pin-Priority: -10
This pinning of > 1000 will make apt force a downgrade on packages from that channel and a priority of < 0 on the
-proposed
and-backports
channels will make remove any additional packages too.
Now run
sudo apt-get update
sudo apt-get dist-upgrade
Inspect the proposed solution apt will give you, and if you think it's okay, then accept it. If you need to check on why and what version it will be downgraded to, check this with
apt-cache policy packagename
to see what versions are available and what apt decides is the candidate for installation.
Remove the
/etc/apt/preferences.d/99-back-to-stable-updates
file again, as it's not needed anymore.
Thanks to mlind
on the Ubuntu forums for this inspriation on pinning in his post from more than 5 years ago - yet it helped me out pretty well today.
I suppose it should work with debian as well. Unfortunately, it doesn't do anything for me :/
– Michael
Mar 18 '16 at 17:27
@Michael 1) Debian does not have the concept of -proposed official repositories. 2) This site is about Ubuntu, not Debian. I'd suggest you to ask a new question on Unix.SE.
– gertvdijk
Mar 19 '16 at 15:38
This solution also worked with 'xenial' version! (after replacing precise with xenial in the file, of course) Thanks a lot!
– morhook
Jul 5 '16 at 16:47
add a comment |
This page suggests that Apt pinning can be used to downgrade from an entire repository by leveraging the fact that pin priorities higher than 1000 can cause package downgrades.
One solution, then, might be to temporarily increment by 1000 the default priorities of all package files except for those from the natty-proposed
repository:
apt-cache policy | awk '
/^ [0-9]+ / {
p = $1;
getline;
r = $0;
if (r !~ /a=natty-proposed/) p += 1000;
print "Package: *nPin: " r "nPin-priority: " p "n"
}
' | sudo tee /etc/apt/preferences.d/downgrade-from-natty-proposed
(Note: This method fails to increase the priority of package files whose release fields contain commas. See this question.)
After doing this, apt-get --simulate upgrade
can be used to test for successful downgrade detection. After confirming that the correct downgrades are detected, sudo apt-get upgrade
should be all that is needed to perform the downgrade.
When the downgrade is complete, use Software Sources to disable the Pre-release updates (natty-proposed) repository, then remove the temporary priority increase:
sudo rm /etc/apt/preferences.d/downgrade-from-natty-proposed
Finally, reboot so that all running programs are their downgraded versions.
1
Interesting solution, probably best and more general than mine. By the way, the number of downgraded packages is the same, confirming the correctness of both approaches.
– enzotib
Sep 2 '11 at 18:18
add a comment |
I cannot find a simpler solution than the following. Yet hoping someone get in with a better answer.
The following script that can execute the downgrade
#!/bin/bash
# get a list of installed packages
dpkg --get-selections | awk '{ print $1 }' > all-packages
# run apt-cache policy on each of them, then elaborate with the awk script
apt-cache policy $(<all-packages) |
./get-prev-pkg-vers >old-versions
# install previous version of packages
sudo apt-get --simulate install $(< old-versions)
The awk
script, named get-prev-pkg-vers
is as follow
#!/usr/bin/awk -f
/^[^ ]/ {
package = $1
gsub(":", "", package)
search_next = 0
}
/^ [^ ]/ {
installed = 0
version = $1
if (search_next == 1) {
print package "=" version
search_next = 0
}
}
/^ *** [^ ]/ {
installed = 1
}
/^ [^ ]/ {
branch = $3
if (installed == 1 && branch ~ /proposed/) {
search_next = 1
}
installed = 0
}
When running the script, the proposed repo should NOT have been disable yet.
Remember to set the executable bit on both scripts.
A problem with this approach is that all downgraded packages will result as manually installed (also those that were automacally installed).
To be safe, add the --simulate
option to apt-get
at end of the bash script.
add a comment |
Reverting all packages from natty-proposed is probably not needed: most packages will be updated to the same versions soon through natty-updates anyway.
In case you have a problem with one package, you could revert that one package using the method darent presents (after disabling -proposed), or you can use sudo aptitude install packagename/natty
. But more importantly, you should file a bug against the package. Few people actually test natty-proposed, and if regressions (=new problems) occur they should certainly be reported. Otherwise they might end-up in the updates for all ubuntu users. So if you have any issues, please report.
add a comment |
In synaptic you can disable the repository for proposed and update your sources. Then you'll see than all the packages than have been updated appears as locally installed (since they're not in the repos anymore).
Now you'll have to "downgrade" those packages. Select one by one, and in the upper menu chose:
package > force version
(or Control+E)
A menu will appear with the avalliable options. I'd choose the lower version number for each package. If you make a mistake and there's a newer version in the normal repos, it will be solved in a later update.
A quick solution would be to use the purge-ppa command pointing to the porposed repository, but don't know if it would work with them, i've only used it to purge external ppa's and downgrade packages to the official ubuntu versions. I won't recomend you to do this in this case, maybe somebody know if it's a safe method...
The last paragraph is speculation only and should therefore be a comment on the question or researched properly.
– Karl Richter
Jan 4 at 9:48
add a comment |
I proposed to provide a function to downgrade all proposed
packages with a simple maintained command equiavalent to ppa-purge
at https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1810499 since the posts here still seem to represent the state of the system.
"proposed" - get it?
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f59443%2fhow-can-i-revert-back-from-an-upgrade-to-the-proposed-repository%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here's a more general way to revert from locally installed packages, proposed and backports packages to the stable+updates channel. While the other answers are correct and work in a similar way, I think this is a more elegant approach.
- Make sure you removed the entries of
-proposed
or-backports
in your/etc/apt/sources.list
and/etc/apt/sources.list.d/*
files.
Add an apt-preferences file, e.g.
/etc/apt/preferences.d/99-back-to-stable-updates
containing (forprecise
here - replace with your version):
Package: *
Pin: release a=precise
Pin-Priority: 1001
Package: *
Pin: release a=precise-updates
Pin-Priority: 1001
Package: *
Pin: release a=precise-security
Pin-Priority: 1001
Package: *
Pin: release a=precise-proposed
Pin-Priority: -10
Package: *
Pin: release a=precise-backports
Pin-Priority: -10
This pinning of > 1000 will make apt force a downgrade on packages from that channel and a priority of < 0 on the
-proposed
and-backports
channels will make remove any additional packages too.
Now run
sudo apt-get update
sudo apt-get dist-upgrade
Inspect the proposed solution apt will give you, and if you think it's okay, then accept it. If you need to check on why and what version it will be downgraded to, check this with
apt-cache policy packagename
to see what versions are available and what apt decides is the candidate for installation.
Remove the
/etc/apt/preferences.d/99-back-to-stable-updates
file again, as it's not needed anymore.
Thanks to mlind
on the Ubuntu forums for this inspriation on pinning in his post from more than 5 years ago - yet it helped me out pretty well today.
I suppose it should work with debian as well. Unfortunately, it doesn't do anything for me :/
– Michael
Mar 18 '16 at 17:27
@Michael 1) Debian does not have the concept of -proposed official repositories. 2) This site is about Ubuntu, not Debian. I'd suggest you to ask a new question on Unix.SE.
– gertvdijk
Mar 19 '16 at 15:38
This solution also worked with 'xenial' version! (after replacing precise with xenial in the file, of course) Thanks a lot!
– morhook
Jul 5 '16 at 16:47
add a comment |
Here's a more general way to revert from locally installed packages, proposed and backports packages to the stable+updates channel. While the other answers are correct and work in a similar way, I think this is a more elegant approach.
- Make sure you removed the entries of
-proposed
or-backports
in your/etc/apt/sources.list
and/etc/apt/sources.list.d/*
files.
Add an apt-preferences file, e.g.
/etc/apt/preferences.d/99-back-to-stable-updates
containing (forprecise
here - replace with your version):
Package: *
Pin: release a=precise
Pin-Priority: 1001
Package: *
Pin: release a=precise-updates
Pin-Priority: 1001
Package: *
Pin: release a=precise-security
Pin-Priority: 1001
Package: *
Pin: release a=precise-proposed
Pin-Priority: -10
Package: *
Pin: release a=precise-backports
Pin-Priority: -10
This pinning of > 1000 will make apt force a downgrade on packages from that channel and a priority of < 0 on the
-proposed
and-backports
channels will make remove any additional packages too.
Now run
sudo apt-get update
sudo apt-get dist-upgrade
Inspect the proposed solution apt will give you, and if you think it's okay, then accept it. If you need to check on why and what version it will be downgraded to, check this with
apt-cache policy packagename
to see what versions are available and what apt decides is the candidate for installation.
Remove the
/etc/apt/preferences.d/99-back-to-stable-updates
file again, as it's not needed anymore.
Thanks to mlind
on the Ubuntu forums for this inspriation on pinning in his post from more than 5 years ago - yet it helped me out pretty well today.
I suppose it should work with debian as well. Unfortunately, it doesn't do anything for me :/
– Michael
Mar 18 '16 at 17:27
@Michael 1) Debian does not have the concept of -proposed official repositories. 2) This site is about Ubuntu, not Debian. I'd suggest you to ask a new question on Unix.SE.
– gertvdijk
Mar 19 '16 at 15:38
This solution also worked with 'xenial' version! (after replacing precise with xenial in the file, of course) Thanks a lot!
– morhook
Jul 5 '16 at 16:47
add a comment |
Here's a more general way to revert from locally installed packages, proposed and backports packages to the stable+updates channel. While the other answers are correct and work in a similar way, I think this is a more elegant approach.
- Make sure you removed the entries of
-proposed
or-backports
in your/etc/apt/sources.list
and/etc/apt/sources.list.d/*
files.
Add an apt-preferences file, e.g.
/etc/apt/preferences.d/99-back-to-stable-updates
containing (forprecise
here - replace with your version):
Package: *
Pin: release a=precise
Pin-Priority: 1001
Package: *
Pin: release a=precise-updates
Pin-Priority: 1001
Package: *
Pin: release a=precise-security
Pin-Priority: 1001
Package: *
Pin: release a=precise-proposed
Pin-Priority: -10
Package: *
Pin: release a=precise-backports
Pin-Priority: -10
This pinning of > 1000 will make apt force a downgrade on packages from that channel and a priority of < 0 on the
-proposed
and-backports
channels will make remove any additional packages too.
Now run
sudo apt-get update
sudo apt-get dist-upgrade
Inspect the proposed solution apt will give you, and if you think it's okay, then accept it. If you need to check on why and what version it will be downgraded to, check this with
apt-cache policy packagename
to see what versions are available and what apt decides is the candidate for installation.
Remove the
/etc/apt/preferences.d/99-back-to-stable-updates
file again, as it's not needed anymore.
Thanks to mlind
on the Ubuntu forums for this inspriation on pinning in his post from more than 5 years ago - yet it helped me out pretty well today.
Here's a more general way to revert from locally installed packages, proposed and backports packages to the stable+updates channel. While the other answers are correct and work in a similar way, I think this is a more elegant approach.
- Make sure you removed the entries of
-proposed
or-backports
in your/etc/apt/sources.list
and/etc/apt/sources.list.d/*
files.
Add an apt-preferences file, e.g.
/etc/apt/preferences.d/99-back-to-stable-updates
containing (forprecise
here - replace with your version):
Package: *
Pin: release a=precise
Pin-Priority: 1001
Package: *
Pin: release a=precise-updates
Pin-Priority: 1001
Package: *
Pin: release a=precise-security
Pin-Priority: 1001
Package: *
Pin: release a=precise-proposed
Pin-Priority: -10
Package: *
Pin: release a=precise-backports
Pin-Priority: -10
This pinning of > 1000 will make apt force a downgrade on packages from that channel and a priority of < 0 on the
-proposed
and-backports
channels will make remove any additional packages too.
Now run
sudo apt-get update
sudo apt-get dist-upgrade
Inspect the proposed solution apt will give you, and if you think it's okay, then accept it. If you need to check on why and what version it will be downgraded to, check this with
apt-cache policy packagename
to see what versions are available and what apt decides is the candidate for installation.
Remove the
/etc/apt/preferences.d/99-back-to-stable-updates
file again, as it's not needed anymore.
Thanks to mlind
on the Ubuntu forums for this inspriation on pinning in his post from more than 5 years ago - yet it helped me out pretty well today.
answered Dec 16 '12 at 16:49
gertvdijkgertvdijk
50.3k18142238
50.3k18142238
I suppose it should work with debian as well. Unfortunately, it doesn't do anything for me :/
– Michael
Mar 18 '16 at 17:27
@Michael 1) Debian does not have the concept of -proposed official repositories. 2) This site is about Ubuntu, not Debian. I'd suggest you to ask a new question on Unix.SE.
– gertvdijk
Mar 19 '16 at 15:38
This solution also worked with 'xenial' version! (after replacing precise with xenial in the file, of course) Thanks a lot!
– morhook
Jul 5 '16 at 16:47
add a comment |
I suppose it should work with debian as well. Unfortunately, it doesn't do anything for me :/
– Michael
Mar 18 '16 at 17:27
@Michael 1) Debian does not have the concept of -proposed official repositories. 2) This site is about Ubuntu, not Debian. I'd suggest you to ask a new question on Unix.SE.
– gertvdijk
Mar 19 '16 at 15:38
This solution also worked with 'xenial' version! (after replacing precise with xenial in the file, of course) Thanks a lot!
– morhook
Jul 5 '16 at 16:47
I suppose it should work with debian as well. Unfortunately, it doesn't do anything for me :/
– Michael
Mar 18 '16 at 17:27
I suppose it should work with debian as well. Unfortunately, it doesn't do anything for me :/
– Michael
Mar 18 '16 at 17:27
@Michael 1) Debian does not have the concept of -proposed official repositories. 2) This site is about Ubuntu, not Debian. I'd suggest you to ask a new question on Unix.SE.
– gertvdijk
Mar 19 '16 at 15:38
@Michael 1) Debian does not have the concept of -proposed official repositories. 2) This site is about Ubuntu, not Debian. I'd suggest you to ask a new question on Unix.SE.
– gertvdijk
Mar 19 '16 at 15:38
This solution also worked with 'xenial' version! (after replacing precise with xenial in the file, of course) Thanks a lot!
– morhook
Jul 5 '16 at 16:47
This solution also worked with 'xenial' version! (after replacing precise with xenial in the file, of course) Thanks a lot!
– morhook
Jul 5 '16 at 16:47
add a comment |
This page suggests that Apt pinning can be used to downgrade from an entire repository by leveraging the fact that pin priorities higher than 1000 can cause package downgrades.
One solution, then, might be to temporarily increment by 1000 the default priorities of all package files except for those from the natty-proposed
repository:
apt-cache policy | awk '
/^ [0-9]+ / {
p = $1;
getline;
r = $0;
if (r !~ /a=natty-proposed/) p += 1000;
print "Package: *nPin: " r "nPin-priority: " p "n"
}
' | sudo tee /etc/apt/preferences.d/downgrade-from-natty-proposed
(Note: This method fails to increase the priority of package files whose release fields contain commas. See this question.)
After doing this, apt-get --simulate upgrade
can be used to test for successful downgrade detection. After confirming that the correct downgrades are detected, sudo apt-get upgrade
should be all that is needed to perform the downgrade.
When the downgrade is complete, use Software Sources to disable the Pre-release updates (natty-proposed) repository, then remove the temporary priority increase:
sudo rm /etc/apt/preferences.d/downgrade-from-natty-proposed
Finally, reboot so that all running programs are their downgraded versions.
1
Interesting solution, probably best and more general than mine. By the way, the number of downgraded packages is the same, confirming the correctness of both approaches.
– enzotib
Sep 2 '11 at 18:18
add a comment |
This page suggests that Apt pinning can be used to downgrade from an entire repository by leveraging the fact that pin priorities higher than 1000 can cause package downgrades.
One solution, then, might be to temporarily increment by 1000 the default priorities of all package files except for those from the natty-proposed
repository:
apt-cache policy | awk '
/^ [0-9]+ / {
p = $1;
getline;
r = $0;
if (r !~ /a=natty-proposed/) p += 1000;
print "Package: *nPin: " r "nPin-priority: " p "n"
}
' | sudo tee /etc/apt/preferences.d/downgrade-from-natty-proposed
(Note: This method fails to increase the priority of package files whose release fields contain commas. See this question.)
After doing this, apt-get --simulate upgrade
can be used to test for successful downgrade detection. After confirming that the correct downgrades are detected, sudo apt-get upgrade
should be all that is needed to perform the downgrade.
When the downgrade is complete, use Software Sources to disable the Pre-release updates (natty-proposed) repository, then remove the temporary priority increase:
sudo rm /etc/apt/preferences.d/downgrade-from-natty-proposed
Finally, reboot so that all running programs are their downgraded versions.
1
Interesting solution, probably best and more general than mine. By the way, the number of downgraded packages is the same, confirming the correctness of both approaches.
– enzotib
Sep 2 '11 at 18:18
add a comment |
This page suggests that Apt pinning can be used to downgrade from an entire repository by leveraging the fact that pin priorities higher than 1000 can cause package downgrades.
One solution, then, might be to temporarily increment by 1000 the default priorities of all package files except for those from the natty-proposed
repository:
apt-cache policy | awk '
/^ [0-9]+ / {
p = $1;
getline;
r = $0;
if (r !~ /a=natty-proposed/) p += 1000;
print "Package: *nPin: " r "nPin-priority: " p "n"
}
' | sudo tee /etc/apt/preferences.d/downgrade-from-natty-proposed
(Note: This method fails to increase the priority of package files whose release fields contain commas. See this question.)
After doing this, apt-get --simulate upgrade
can be used to test for successful downgrade detection. After confirming that the correct downgrades are detected, sudo apt-get upgrade
should be all that is needed to perform the downgrade.
When the downgrade is complete, use Software Sources to disable the Pre-release updates (natty-proposed) repository, then remove the temporary priority increase:
sudo rm /etc/apt/preferences.d/downgrade-from-natty-proposed
Finally, reboot so that all running programs are their downgraded versions.
This page suggests that Apt pinning can be used to downgrade from an entire repository by leveraging the fact that pin priorities higher than 1000 can cause package downgrades.
One solution, then, might be to temporarily increment by 1000 the default priorities of all package files except for those from the natty-proposed
repository:
apt-cache policy | awk '
/^ [0-9]+ / {
p = $1;
getline;
r = $0;
if (r !~ /a=natty-proposed/) p += 1000;
print "Package: *nPin: " r "nPin-priority: " p "n"
}
' | sudo tee /etc/apt/preferences.d/downgrade-from-natty-proposed
(Note: This method fails to increase the priority of package files whose release fields contain commas. See this question.)
After doing this, apt-get --simulate upgrade
can be used to test for successful downgrade detection. After confirming that the correct downgrades are detected, sudo apt-get upgrade
should be all that is needed to perform the downgrade.
When the downgrade is complete, use Software Sources to disable the Pre-release updates (natty-proposed) repository, then remove the temporary priority increase:
sudo rm /etc/apt/preferences.d/downgrade-from-natty-proposed
Finally, reboot so that all running programs are their downgraded versions.
edited Apr 13 '17 at 12:24
Community♦
1
1
answered Sep 2 '11 at 17:53
ændrükændrük
41.8k61194339
41.8k61194339
1
Interesting solution, probably best and more general than mine. By the way, the number of downgraded packages is the same, confirming the correctness of both approaches.
– enzotib
Sep 2 '11 at 18:18
add a comment |
1
Interesting solution, probably best and more general than mine. By the way, the number of downgraded packages is the same, confirming the correctness of both approaches.
– enzotib
Sep 2 '11 at 18:18
1
1
Interesting solution, probably best and more general than mine. By the way, the number of downgraded packages is the same, confirming the correctness of both approaches.
– enzotib
Sep 2 '11 at 18:18
Interesting solution, probably best and more general than mine. By the way, the number of downgraded packages is the same, confirming the correctness of both approaches.
– enzotib
Sep 2 '11 at 18:18
add a comment |
I cannot find a simpler solution than the following. Yet hoping someone get in with a better answer.
The following script that can execute the downgrade
#!/bin/bash
# get a list of installed packages
dpkg --get-selections | awk '{ print $1 }' > all-packages
# run apt-cache policy on each of them, then elaborate with the awk script
apt-cache policy $(<all-packages) |
./get-prev-pkg-vers >old-versions
# install previous version of packages
sudo apt-get --simulate install $(< old-versions)
The awk
script, named get-prev-pkg-vers
is as follow
#!/usr/bin/awk -f
/^[^ ]/ {
package = $1
gsub(":", "", package)
search_next = 0
}
/^ [^ ]/ {
installed = 0
version = $1
if (search_next == 1) {
print package "=" version
search_next = 0
}
}
/^ *** [^ ]/ {
installed = 1
}
/^ [^ ]/ {
branch = $3
if (installed == 1 && branch ~ /proposed/) {
search_next = 1
}
installed = 0
}
When running the script, the proposed repo should NOT have been disable yet.
Remember to set the executable bit on both scripts.
A problem with this approach is that all downgraded packages will result as manually installed (also those that were automacally installed).
To be safe, add the --simulate
option to apt-get
at end of the bash script.
add a comment |
I cannot find a simpler solution than the following. Yet hoping someone get in with a better answer.
The following script that can execute the downgrade
#!/bin/bash
# get a list of installed packages
dpkg --get-selections | awk '{ print $1 }' > all-packages
# run apt-cache policy on each of them, then elaborate with the awk script
apt-cache policy $(<all-packages) |
./get-prev-pkg-vers >old-versions
# install previous version of packages
sudo apt-get --simulate install $(< old-versions)
The awk
script, named get-prev-pkg-vers
is as follow
#!/usr/bin/awk -f
/^[^ ]/ {
package = $1
gsub(":", "", package)
search_next = 0
}
/^ [^ ]/ {
installed = 0
version = $1
if (search_next == 1) {
print package "=" version
search_next = 0
}
}
/^ *** [^ ]/ {
installed = 1
}
/^ [^ ]/ {
branch = $3
if (installed == 1 && branch ~ /proposed/) {
search_next = 1
}
installed = 0
}
When running the script, the proposed repo should NOT have been disable yet.
Remember to set the executable bit on both scripts.
A problem with this approach is that all downgraded packages will result as manually installed (also those that were automacally installed).
To be safe, add the --simulate
option to apt-get
at end of the bash script.
add a comment |
I cannot find a simpler solution than the following. Yet hoping someone get in with a better answer.
The following script that can execute the downgrade
#!/bin/bash
# get a list of installed packages
dpkg --get-selections | awk '{ print $1 }' > all-packages
# run apt-cache policy on each of them, then elaborate with the awk script
apt-cache policy $(<all-packages) |
./get-prev-pkg-vers >old-versions
# install previous version of packages
sudo apt-get --simulate install $(< old-versions)
The awk
script, named get-prev-pkg-vers
is as follow
#!/usr/bin/awk -f
/^[^ ]/ {
package = $1
gsub(":", "", package)
search_next = 0
}
/^ [^ ]/ {
installed = 0
version = $1
if (search_next == 1) {
print package "=" version
search_next = 0
}
}
/^ *** [^ ]/ {
installed = 1
}
/^ [^ ]/ {
branch = $3
if (installed == 1 && branch ~ /proposed/) {
search_next = 1
}
installed = 0
}
When running the script, the proposed repo should NOT have been disable yet.
Remember to set the executable bit on both scripts.
A problem with this approach is that all downgraded packages will result as manually installed (also those that were automacally installed).
To be safe, add the --simulate
option to apt-get
at end of the bash script.
I cannot find a simpler solution than the following. Yet hoping someone get in with a better answer.
The following script that can execute the downgrade
#!/bin/bash
# get a list of installed packages
dpkg --get-selections | awk '{ print $1 }' > all-packages
# run apt-cache policy on each of them, then elaborate with the awk script
apt-cache policy $(<all-packages) |
./get-prev-pkg-vers >old-versions
# install previous version of packages
sudo apt-get --simulate install $(< old-versions)
The awk
script, named get-prev-pkg-vers
is as follow
#!/usr/bin/awk -f
/^[^ ]/ {
package = $1
gsub(":", "", package)
search_next = 0
}
/^ [^ ]/ {
installed = 0
version = $1
if (search_next == 1) {
print package "=" version
search_next = 0
}
}
/^ *** [^ ]/ {
installed = 1
}
/^ [^ ]/ {
branch = $3
if (installed == 1 && branch ~ /proposed/) {
search_next = 1
}
installed = 0
}
When running the script, the proposed repo should NOT have been disable yet.
Remember to set the executable bit on both scripts.
A problem with this approach is that all downgraded packages will result as manually installed (also those that were automacally installed).
To be safe, add the --simulate
option to apt-get
at end of the bash script.
answered Aug 31 '11 at 20:12
enzotibenzotib
63k6132154
63k6132154
add a comment |
add a comment |
Reverting all packages from natty-proposed is probably not needed: most packages will be updated to the same versions soon through natty-updates anyway.
In case you have a problem with one package, you could revert that one package using the method darent presents (after disabling -proposed), or you can use sudo aptitude install packagename/natty
. But more importantly, you should file a bug against the package. Few people actually test natty-proposed, and if regressions (=new problems) occur they should certainly be reported. Otherwise they might end-up in the updates for all ubuntu users. So if you have any issues, please report.
add a comment |
Reverting all packages from natty-proposed is probably not needed: most packages will be updated to the same versions soon through natty-updates anyway.
In case you have a problem with one package, you could revert that one package using the method darent presents (after disabling -proposed), or you can use sudo aptitude install packagename/natty
. But more importantly, you should file a bug against the package. Few people actually test natty-proposed, and if regressions (=new problems) occur they should certainly be reported. Otherwise they might end-up in the updates for all ubuntu users. So if you have any issues, please report.
add a comment |
Reverting all packages from natty-proposed is probably not needed: most packages will be updated to the same versions soon through natty-updates anyway.
In case you have a problem with one package, you could revert that one package using the method darent presents (after disabling -proposed), or you can use sudo aptitude install packagename/natty
. But more importantly, you should file a bug against the package. Few people actually test natty-proposed, and if regressions (=new problems) occur they should certainly be reported. Otherwise they might end-up in the updates for all ubuntu users. So if you have any issues, please report.
Reverting all packages from natty-proposed is probably not needed: most packages will be updated to the same versions soon through natty-updates anyway.
In case you have a problem with one package, you could revert that one package using the method darent presents (after disabling -proposed), or you can use sudo aptitude install packagename/natty
. But more importantly, you should file a bug against the package. Few people actually test natty-proposed, and if regressions (=new problems) occur they should certainly be reported. Otherwise they might end-up in the updates for all ubuntu users. So if you have any issues, please report.
answered Aug 31 '11 at 20:22
johanvdwjohanvdw
971610
971610
add a comment |
add a comment |
In synaptic you can disable the repository for proposed and update your sources. Then you'll see than all the packages than have been updated appears as locally installed (since they're not in the repos anymore).
Now you'll have to "downgrade" those packages. Select one by one, and in the upper menu chose:
package > force version
(or Control+E)
A menu will appear with the avalliable options. I'd choose the lower version number for each package. If you make a mistake and there's a newer version in the normal repos, it will be solved in a later update.
A quick solution would be to use the purge-ppa command pointing to the porposed repository, but don't know if it would work with them, i've only used it to purge external ppa's and downgrade packages to the official ubuntu versions. I won't recomend you to do this in this case, maybe somebody know if it's a safe method...
The last paragraph is speculation only and should therefore be a comment on the question or researched properly.
– Karl Richter
Jan 4 at 9:48
add a comment |
In synaptic you can disable the repository for proposed and update your sources. Then you'll see than all the packages than have been updated appears as locally installed (since they're not in the repos anymore).
Now you'll have to "downgrade" those packages. Select one by one, and in the upper menu chose:
package > force version
(or Control+E)
A menu will appear with the avalliable options. I'd choose the lower version number for each package. If you make a mistake and there's a newer version in the normal repos, it will be solved in a later update.
A quick solution would be to use the purge-ppa command pointing to the porposed repository, but don't know if it would work with them, i've only used it to purge external ppa's and downgrade packages to the official ubuntu versions. I won't recomend you to do this in this case, maybe somebody know if it's a safe method...
The last paragraph is speculation only and should therefore be a comment on the question or researched properly.
– Karl Richter
Jan 4 at 9:48
add a comment |
In synaptic you can disable the repository for proposed and update your sources. Then you'll see than all the packages than have been updated appears as locally installed (since they're not in the repos anymore).
Now you'll have to "downgrade" those packages. Select one by one, and in the upper menu chose:
package > force version
(or Control+E)
A menu will appear with the avalliable options. I'd choose the lower version number for each package. If you make a mistake and there's a newer version in the normal repos, it will be solved in a later update.
A quick solution would be to use the purge-ppa command pointing to the porposed repository, but don't know if it would work with them, i've only used it to purge external ppa's and downgrade packages to the official ubuntu versions. I won't recomend you to do this in this case, maybe somebody know if it's a safe method...
In synaptic you can disable the repository for proposed and update your sources. Then you'll see than all the packages than have been updated appears as locally installed (since they're not in the repos anymore).
Now you'll have to "downgrade" those packages. Select one by one, and in the upper menu chose:
package > force version
(or Control+E)
A menu will appear with the avalliable options. I'd choose the lower version number for each package. If you make a mistake and there's a newer version in the normal repos, it will be solved in a later update.
A quick solution would be to use the purge-ppa command pointing to the porposed repository, but don't know if it would work with them, i've only used it to purge external ppa's and downgrade packages to the official ubuntu versions. I won't recomend you to do this in this case, maybe somebody know if it's a safe method...
edited Jan 4 at 9:47
Karl Richter
2,42983568
2,42983568
answered Aug 31 '11 at 19:08
animaletdesequiaanimaletdesequia
6,64041938
6,64041938
The last paragraph is speculation only and should therefore be a comment on the question or researched properly.
– Karl Richter
Jan 4 at 9:48
add a comment |
The last paragraph is speculation only and should therefore be a comment on the question or researched properly.
– Karl Richter
Jan 4 at 9:48
The last paragraph is speculation only and should therefore be a comment on the question or researched properly.
– Karl Richter
Jan 4 at 9:48
The last paragraph is speculation only and should therefore be a comment on the question or researched properly.
– Karl Richter
Jan 4 at 9:48
add a comment |
I proposed to provide a function to downgrade all proposed
packages with a simple maintained command equiavalent to ppa-purge
at https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1810499 since the posts here still seem to represent the state of the system.
"proposed" - get it?
add a comment |
I proposed to provide a function to downgrade all proposed
packages with a simple maintained command equiavalent to ppa-purge
at https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1810499 since the posts here still seem to represent the state of the system.
"proposed" - get it?
add a comment |
I proposed to provide a function to downgrade all proposed
packages with a simple maintained command equiavalent to ppa-purge
at https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1810499 since the posts here still seem to represent the state of the system.
"proposed" - get it?
I proposed to provide a function to downgrade all proposed
packages with a simple maintained command equiavalent to ppa-purge
at https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1810499 since the posts here still seem to represent the state of the system.
"proposed" - get it?
answered Jan 4 at 10:07
Karl RichterKarl Richter
2,42983568
2,42983568
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f59443%2fhow-can-i-revert-back-from-an-upgrade-to-the-proposed-repository%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
The test results pastebins are dead.
– enzotib
Aug 23 '13 at 8:30