DowngradeHowto

来自Ubuntu中文
Oneleaf留言 | 贡献2007年5月30日 (三) 18:39的版本 (新页面: == Downgrade == So, for one reason or another, you've upgraded Ubuntu to a new version. Now, you're not liking the new version (or it's a development version and too unstable for your tas...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索

Downgrade

So, for one reason or another, you've upgraded Ubuntu to a new version. Now, you're not liking the new version (or it's a development version and too unstable for your taste). Downgrading is a little-covered topic, but let's change that!

DISCLAIMER

This document is still under development. I have *YET TO TEST THE PROCEDURE*. Please pursue at your own risk until this documentation is completed!

Getting Started

For this guide, we'll use the example of downgrading Ubuntu Breezy to Ubuntu Hoary. This guide can be adapted to downgrade any combination of releases.

The Procedure

Setting up sources

You'll need sources.list entries for both releases for the procedure to work properly. It's important to remove all other lines for now! Example sources.list:

deb http://archive.ubuntu.com/ubuntu hoary main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu breezy main restricted universe multiverse

Setting up pinning

Open up /etc/apt/preferences with your favorite editor (such as sudo gedit /etc/apt/preferences)

Add the following lines to the file (remove any existing entries):

Package: *
Pin: release a=hoary
Pin-Priority: 1001

Package: *
Pin: release a=breezy
Pin-Priority: 60

Doing the downgrade

If you're ready to continue, we're going to continue:

First, we need to update APT's information: sudo apt-get update

Next, we'll downgrade: sudo apt-get dist-upgrade

Cleaning up after the storm

The last step probably will end up a catastrophic mess of incompletely installed packages. We need to fix that now.

Sources

http://linuxmafia.com/faq/Debian/downgrade.html



降级

出于某种原因,你将Ubuntu升级到了一个新的版本。可是,你发现你并不喜欢这个新版本(或者这个新版本是个尚未开发完毕的版本,并且它很不合你的口味)。尽管降级是个容易被忽略的主题,可是并非不能实现,现在就让我们来进行降级操作吧。

不承诺声明

这份文档仍然处于完善中。尽管我已经测试过程序了,但仍然有操作失败的风险。你需要衡量一下是否值得冒这个险直到这份操作文档彻底完成。

开始操作

在这份操作指南中,我们以Ubuntu Breezy降级到Ubuntu Hoary为例子来说明如何进行降级操作。这份操作指南适用于所有的发行版本的任意组合。

脚本程序

设置源

你需要设置一下sources.list的条目,只保留降级操作的始末的版本信息,以便能使降级操作得以运行。记住要将其他所有的行都去掉,这很重要。以下是一个sources.list的例子:

deb http://archive.ubuntu.com/ubuntu hoary main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu breezy main restricted universe multiverse

设置销连接

用编辑器(如gedit)打开/etc/apt/preferences (如 sudo gedit /etc/apt/preferences)

将下面这几行加入到这个文件中(记住先把其他的内容清除掉):

Package: *
Pin: release a=hoary
Pin-Priority: 1001

Package: *
Pin: release a=breezy
Pin-Priority: 60

进行降级操作

如果你准备好了,我们就继续我们的降级操作:

首先,我们需要升级APT的信息: sudo apt-get update

然后,我们就开始降级: sudo apt-get dist-upgrade

操作失败后的修复工作

我们操作的结果可能会变成安装不完全的悲惨结局,因此我们需要修复它。

翻译:norvid 2005-12-18

转载自

http://linuxmafia.com/faq/Debian/downgrade.html