[wiki]HOWTO: debfoster实战

参与到Ubuntu的翻译中来
回复
头像
freeflying
帖子: 521
注册时间: 2005-03-26 9:38

[wiki]HOWTO: debfoster实战

#1

帖子 freeflying » 2005-05-27 9:06

Hi,

This is not for the faint of heart so fresh baked noobs get away!

This is my first HOWTO. I noticed I was explaining debfoster a lot and I wanted to have a link to it. debfoster is a very powerful tool once you are getting used to it. I've thought up five scenarios of use :

SCENARIO 1)You use it to keep track of what you did install
SCENARIO 2)You want to make your system clean,mean and lean.
SCENARIO 3)You have had problems with upgrading to hoary or you have entered a dependencies hell on accident.
SCENARIO 4)You want an internet gateway with a nice windowmanager that uses little resources.
SCENARIO 5)You want to remove all of kde and kubuntu and go back to ubuntu-desktop

apt-cache show debfoster :

Quote:
Description: Install only wanted Debian packages
debfoster is a wrapper program for apt and dpkg. When first run, it
will ask you which of the installed packages you want to keep
installed.
.
After that, it maintains a list of packages that you want to have
installed on your system. It uses this list to detect packages that
have been installed only because other packages depended on them. If
one of these dependencies changes, debfoster will take notice, and
ask if you want to remove the old package.
.
This helps you to maintain a clean Debian install, without old
(mainly library) packages lying around that aren't used any more.





man debfoster :

Quote:
debfoster - weed unnecessary Debian packages

debfoster maintains a list of installed packages that were explicitly requested rather than installed as a dependency. Arguments are entirely optional, debfoster can be invoked per se after each run of dpkg and/or apt-get.

Alternatively you can use debfoster to install and remove packages by specifying the packages on the command line. Packages suffixed with a - are removed while packages without a suffix are installed.

If a new package is encountered or if debfoster notices that a package that used to be a dependency is now an orphan, it will ask you what to do with it. If you decide to keep it, debfoster will just take note and continue. If you decide that this package is not interesting enough it will be removed as soon as debfoster is done asking questions. If your choises cause other packages to become orphaned more questions will ensue.




to install debfoster :
sudo apt-get install debfoster

EVERYTHING IN THIS HOWTO IS AT YOUR OWN RISK. You should understand what you are doing and also read the manpage($ man defoster) before doing any commands. If you do the following things the risk will be minimal.

-There is one very IMPORTANT thing. ALWAYS MAKE SURE THAT THE PACKAGE ubuntu-base IS MENTIONED IN YOUR KEEPERS FILE! Never choose to purge it when run debfoster from the commandline! This will render your system unusable.

-Be sure to to never remove the kernel you are currently running from your keepers file. Removing it probably won't succeed but if it will succeed (and you have no other kernels available in your grub menu then it will be a pain to boot the correct kernel)

-don't remove the grub package!

-Also be sure that you backup important configuration files that you have edited yourself!

-If you decide to do it and this is your only box. It would be handy to keep a live-cd aside in case you run into troubles

-it's nice if you leave debfoster in the keepers file otherwise it might try to remove itself

SCENARIO 1)You use it to keep track of what you did install

to install debfoster type :
$ sudo apt-get install debfoster

to create the initial keepers file type :
$ sudo debfoster -q

to edit the keepers file type :
$ sudo pico /var/lib/debfoster/keepers

NEVER remove your current kernel (for example linux-686) and ubuntu-base

Also be sure that you backup important configuration files that you have edited yourself!

To force debfoster to remove all packages that aren't listed in this list or dependencies of packages that are listed in this list.It will also add all packages in this list that aren't installed. So it makes your system comply with this list. Do this :

$ sudo debfoster -f

from the manpage of debfoster :

Quote:
-f, --force
Don’t ask anything and assume ‘no’ as the answer to all questions. It also installs any packages that seem to be missing, thus forcing your
system to comply with the debfoster database. Can have ‘interesting’ results if you’re not careful.




To keep track of what you installed additionally do once in a while :

$ sudo debfoster

type i for info, h for help, p for purge, y for remove and n for not remove

================================================== ==========================================


SCENARIO 2)You want to make your system clean,mean and lean.

basically the same as scenario 1 but I want to add these comments :

ubuntu-base,ubuntu-desktop are the metapackages that all other packages depend on when you first install ubuntu.

This cleans your apt-get cache this can be a lot of space if you never do apt-get clean :
$ sudo apt-cache clean


deborphan is also very nice.
$ sudo apt-get install deborphan

To find leftover configuration files :
$ deborphan --find-config

To find all orphans (only remove things you are sure about!) :
$ deborphan -a

xdiskusage is nice if you want to easily see where the space on your harddrive goes
$ sudo apt-get install xdiskusage

$ sudo xdiskusage

================================================== ============================================


SCENARIO 3)You have had problems with upgrading to hoary or you have entered a dependencies hell on accident.

First go read :

www.ubuntuguide.org
www.ubuntulinux.org/wiki/guidetohoary
http://www.ubuntulinux.org/wiki/HoaryUpgradeNotes

Make sure your /etc/apt/sources.list is the same as the one on : www.ubuntulinux.org/wiki/guidetohoary

You should search the forums about your specific problem. Here's a relevant thread about upgrading to hoary :

http://ubuntuforums.org/showthread.php?t=23624

So you have screwed up your box? The easiest way out of this mess is ofcourse reinstalling when hoary gets released. But that isn't fun.

Okay here we go :

Install debfoster by :
$ sudo apt-get install debfoster

edit your keepers file by :

$ sudo pico /var/lib/debfoster/keepers

It should look at like this (assuming you are on a 686 processor and using grub) :


Code:

ubuntu-base
linux-686
debfoster
grub

You should remove all other lines.

Now we go to init 1. To make sure we don't harm processes that are running.
$ sudo init 1

Also be sure that you backup important configuration files that you have edited yourself!

To force debfoster to remove all packages that aren't listed in this list or dependencies of packages that are listed in this list.It will also add all packages in this list that aren't installed. So it makes your system comply with this list. Do this :

$ sudo debfoster -f

from the manpage of debfoster :

Quote:
-f, --force
Don’t ask anything and assume ‘no’ as the answer to all questions. It also installs any packages that seem to be missing, thus forcing your
system to comply with the debfoster database. Can have ‘interesting’ results if you’re not careful.




After this your system is compatible with the keepers file.

Now install ubuntu-desktop and xserver-xorg by :

sudo apt-get install ubuntu-desktop xserver-xorg

To start your gdm / gnome again do this :

$ sudo init 2

if gdm doesn't start do :

$ startx

if it still doesn't start you should :

backup your /etc/X11/xorg.conf by :
suco cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

reconfigure your xserver by :
$ sudo dpkg-reconfigure xserver-xorg

try to start gdm/gnome again by :

$ startx

if it still doesn't start you should edit your xorg.conf by hand to solve the problem :
$ sudo pico /etc/X11/xorg.conf

or post in the forums for help and include your /var/log/Xorg.0.log

To keep track of what you installed additionally do once in a while :

$ sudo debfoster

type i for info, h for help, p for purge, y for remove and n for not remove

================================================== ===========================================

SCENARIO 4)You want an internet gateway with a nice windowmanager that uses little resources.

I've played enough with xfce4 to feel confident to use it as my only desktop-environment on my internet gateway/fileserver (using xfwm4 and vncserver

It's install size is only 771 mb in /. /home is mounted on a different partition. I've also got installed J2SE and hugin lite (but not from packages). I "downgraded" my ubuntu-base / ubuntu-desktop configuration using debfoster.

I use it for:

-downloading
-working at my own pc from school using vncserver
-fileserver using samba

this is my /var/lib/debfoster/keepers :


Code:

amule
cgoban
debfoster
deborphan
firestarter
flashplayer-mozilla
gaim
gnugo
grub
grubconf
isag
linux-686
mozilla-firefox
nmap
prelink
python
raidtools2
samba
slocate
smbfs
ssh
swf-player
ubuntu-base
unrar
vncserver
xdiskusage
xfce4
xfce4-goodies
xfwm4
xserver-xorg

Okay here we go :

Install debfoster by :
$ sudo apt-get install debfoster

This is to create your initial keepers file :

$ sudo debfoster -q

Now edit your keepers file :

$ sudo pico /var/lib/debfoster/keepers

And change it to at least (IMO for this scenario) :


Code:

debfoster
deborphan
firestarter
gaim
grub
linux-686
mozilla-firefox
prelink
samba
slocate
smbfs
ssh
ubuntu-base
xfce4
xfce4-goodies
xfwm4
xserver-xorg

Also include your favorite applications.Be sure not to forget the ones you have already configured because all packages that are not listed will be removed completly (including configuration files). GNOME applications look really nice in XFCE4! I haven't checked kde applications but they should also work nicely.

Now we go to init 1. To make sure we don't harm processes that are running.
$ sudo init 1

Also be sure that you backup important configuration files that you have edited yourself!

To force debfoster to remove all packages that aren't listed in this list or dependencies of packages that are listed in this list.It will also add all packages in this list that aren't installed. So it makes your system comply with this list. Do this :

$ sudo debfoster -f

from the manpage of debfoster :

Quote:
-f, --force
Don’t ask anything and assume ‘no’ as the answer to all questions. It also installs any packages that seem to be missing, thus forcing your
system to comply with the debfoster database. Can have ‘interesting’ results if you’re not careful.




After this your system is compatible with the keepers file.

To start your xfce4 and enter init level 2 do this :

$ sudo init 2

if xfce4 doesn't start do :

$ startxfce4

if it still doesn't start you should :

backup your /etc/X11/xorg.conf by :
suco cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

reconfigure your xserver by :
$ sudo dpkg-reconfigure xserver-xorg

try to start xfce4 again by :

$ startxfce4

if it still doesn't start you should edit your xorg.conf by hand to solve the problem :
$ sudo pico /etc/X11/xorg.conf

or post in the forums for help and include your /var/log/Xorg.0.log

To keep track of what you installed additionally do once in a while :

$ sudo debfoster

type i for info, h for help, p for purge, y for remove and n for not remove

To configure samba and learn more about it please check www.ubuntuguide.org

see here for how to configure prelink :
http://www.ubuntuforums.org/showthr...ghlight=prelink

================================================== ================================

SCENARIO 5)You want to remove all of kde and kubuntu and go back to ubuntu-desktop

Install debfoster by :
$ sudo apt-get install debfoster

to build the keepers file without asking questions :

$ sudo debfoster -q

and edit your keepers file by :

$ sudo pico /var/lib/debfoster/keepers

It should look at least like this (assuming you are on a 686 processor and using grub) :


Code:

ubuntu-base
ubuntu-desktop
linux-686
xserver-xorg
debfoster
grub

Also include your favorite applications.Be sure not to forget the ones you have already configured because all packages that are not listed will be removed completly (including configuration files).

You should remove kubuntu-desktop and all packages that start with the letter k that you know belong to kde and don't want anymore. If your kubuntu-desktop is broken and doesn't show up don't worry it's just a meta-package. Be sure to remove kdebase,kdm,kdelibs,kdelibs4 if they are mentioned in the keepers file. Also please keep all applications that are mentioned in the keepers file and that you do use. You should remove all other lines you are not sure of.

Now we go to init 1. To make sure we don't harm processes that are running.
$ sudo init 1

Also be sure that you backup important configuration files that you have edited yourself!

To force debfoster to remove all packages that aren't listed in this list or dependencies of packages that are listed in this list.It will also add all packages in this list that aren't installed. So it makes your system comply with this list. Do this :

$ sudo debfoster -f

from the manpage of debfoster :

Quote:
-f, --force
Don’t ask anything and assume ‘no’ as the answer to all questions. It also installs any packages that seem to be missing, thus forcing your
system to comply with the debfoster database. Can have ‘interesting’ results if you’re not careful.




After this your system is compatible with the keepers file.

To start your gdm / gnome again do this :

$ sudo init 2

if gdm doesn't start do :

$ startx

if it still doesn't start you should :

backup your /etc/X11/xorg.conf by :
suco cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

reconfigure your xserver by :
$ sudo dpkg-reconfigure xserver-xorg

try to start gdm/gnome again by :

$ startx

if it still doesn't start you should edit your xorg.conf by hand to solve the problem :
$ sudo pico /etc/X11/xorg.conf

or post in the forums for help and include your /var/log/Xorg.0.log

To keep track of what you installed additionally do once in a while :

$ sudo debfoster

type i for info, h for help, p for purge, y for remove and n for not remove[/code]
yongyi
帖子: 3025
注册时间: 2005-05-07 23:57
联系:

HOWTO: debfoster实战

#2

帖子 yongyi » 2005-06-03 10:56

==========定稿,请指教!====================

Hi,
这不是为胆小鬼而设的,所以请刚刚烘焙的noobs离开!

这是我第一个HOWTO。我注意到我解释debfoster很多,所以我要为它做一个链接。一旦你习惯了它,debfoster会是一个非常强大的工具。我设计出五种使用方案:

方案1)使用它去了解你安装了什么。
方案2)你想使你的系统变得干净、平均和纤瘦的。
方案3)在升级到hoary上你遇到了问题,或者你不小心陷入了依赖困境。
方案4)你想要一个占资源少又有着漂亮窗口管理器的internet网关。
方案5)你想卸载kde和kubuntu全部文件,并回到ubuntu-desktop。


apt-cache show debfoster :
说明:安装只需要Debian软件包
debfoster是一个apt和dpkg的包装程序。第一次运行 ,它会问你想保留哪些已经安装的软件包。

之后,它会保存一张你系统已安装的软件包列表。它利用这张列表去探测已经安装的软件包,仅仅因为其他软件包依赖于他们。
当其中一个依赖改变,debfoster会提醒你,并询问你是否要移走旧的软件包。

这帮助你保持一个干净的Debian,没有不再使用到的旧(主要的软件库)软件包隐藏于其中。


man debfoster :
debfoster──除去不必要的Debian软件包

debfoster 保存一个明确要求安装而不是作为依赖安装的软件包列表。参数是完全自由选择的,在第一次运行dpkg和/或ap-get后,debfoster都可以被唤出。

作为选择,通过在命令行指定软件包,你可以用debfoster去安装和卸载软件包。加了一个-后缀的软件包是被卸载的,同时,没有后缀的是被安装的。

如果遇到一个新的软件包,或debfoster发现曾经被作为依赖的一个软件包现在成为一个孤体,它会询问你要怎么处理它。如果你决定保留它,debfoster将做记录并继续下去。如果你决定这个软件包不够令人感兴趣,debfoster一问完问题,它就将会被卸载。如果你的选择引起其他软件包变成孤体,更多问题将会接踵而来。


安装debfoster:

代码: 全选

sudo apt-get install debfoster

这个HOWTO的任何事情都是自担风险的。你应该知道你正在做什么,并且在执行任何命令前阅读 manpage($ man debfoster)。如果你做下面的事情,风险将会减到最低。


-这里有一件非常重要的事情。始终确保在你的deepers文件中有ubuntu-base软件包!当你在命令行运行debfoster,永远不要选择清除它!这会致使你的系统不可用的。

-确保永不从你的deepers文件中移走你现在正在运行的核心。也许不会成功移走它。但如果它成功,并在你的grub菜单没有其他可用的核心,那么,启动现在的核心将会是痛苦的事情。

-不要移走grub软件包!

-也确保你备份了那些你自己编辑过的重要配置文件!

-如果你决定做下去,并且这是你唯一的系统。为了方便使用,另外保留一张live-cd来以防你运行时遇到麻烦。

-如果你保留debfoster在deepers文件中,那就做对了。否则它会尝试移走自己。



方案1)使用它去了解你安装了什么。

安装debfoster,输入:

代码: 全选

$ sudo apt-get install debfoster
建立最初的keepers文件,输入:

代码: 全选

$ sudo debfoster -q
编辑keepers文件,输入:

代码: 全选

$ sudo pico /var/lib/debfoster/keepers
永远不移走你现在的核心(如linux-686)和ubuntu-base

也要确保你备份了那些你自己编辑过的重要配置文件!

为了强制debfoster移走没在列表中列出的所有软件包,或者列表中这些软件包的依赖。(它也将添加列表中所有还没安装的软件包。因此,它会使你的系统遵守这一列表。)执行这个:

代码: 全选

$ sudo debfoster -f 

来自debfoster的manpage:
-f, --force
不会询问什么,并假定所有问题的答案都是“no”。如此强制你的系统利用debfoster数据库去完成工作,它也安装任何似乎缺少的软件包。如果你不小心,可能会有“有趣的”结果。
马上了解一下你一次额外安装了什么:

代码: 全选

$ sudo debfoster
键入i是信息,h是帮助,p是清除,y是移走,n是不移走。

================================================== ==========================================


方案2)你想使你的系统变得干净、平均和纤瘦的。
基本上跟方案1 一样,但我想增加说明这些:
当你第一次安装ubuntu,ubuntu-base,ubuntu-desktop是所有其他软件包依赖的母体软件包。

这是清理你的apt-get缓存的,如果你从来没执行过apt-get clean,这能清理出很多空间:

代码: 全选

$ sudo apt-cache clean 
deborphan也是很好用的。

代码: 全选

$ sudo apt-get install deborphan
寻找残余的配置文件:

代码: 全选

$ deborphan --find-config
寻找所有的孤体(只移走你确定的东西!):

代码: 全选

$ deborphan -a
$ sudo xdiskusage
如果你想很容易地看到你的硬盘哪里有空间,那xdiskusage会适合你:

代码: 全选

$ sudo apt-get install xdiskusage

$ sudo xdiskusage
================================================== ============================================


方案3)在升级到hoary上你遇到了问题,或者你不小心陷入了依赖困境。
首先阅读:
www.ubuntuguide.org
www.ubuntulinux.org/wiki/guidetohoary
http://www.ubuntulinux.org/wiki/HoaryUpgradeNotes

确定你的/etc/apt/sources.list上有一项跟这相同:

代码: 全选

www.ubuntulinux.org/wiki/guidetohoary
对于你特别的问题,你应该在论坛搜索。这里是一个与升级到hoary相关的线索:
http://ubuntuforums.org/showthread.php?t=23624

因此你已经对你的系统感到烦乱?跳出这困境的最简单方法当然是,当hoary释放时重新安装。但这并不是有趣的。


好了,我们就开始:
安装debfoster:

代码: 全选

$ sudo apt-get install debfoster
]

编辑你的keepers文件:

代码: 全选

$ sudo pico /var/lib/debfoster/keepers
它看起来应该像这样(假设你的是686处理器和使用grub):

代码: 全选

ubuntu-base
linux-686
debfoster

grub 
你应该移走其他行。

现在我们前往init 1。确认我们不会损害正在运行的进程。

代码: 全选

$ sudo init 1
也要确保你备份了那些你自己编辑过的重要配置文件!


为了强制debfoster移走没在列表中列出的所有软件包,或者列表中这些软件包的依赖。(它也将添加列表中所有还没安装的软件包。因此,它会使你的系统遵守这一列表。)执行这个:

代码: 全选

$ sudo debfoster -f 

来自debfoster的manpage:
-f, --force
不会询问什么,并假定所有问题的答案都是“no”。如此强制你的系统利用debfoster数据库去完成工作,它也安装任何似乎缺少的软件包。如果你不小心,可能会有“有趣的”结果。
这之后,你的系统就与keepers文件兼容的。现在安装ubuntu-desktop和xserver-xorg:

代码: 全选

sudo apt-get install ubuntu-desktop xserver-xorg
执行这个来重启你的gdm/gnome:

代码: 全选

$ sudo init 2
如果gdm不能启动,执行:

代码: 全选

$ startx
如果它仍然不能启动,你应该:
备份你的/etc/X11/xorg.conf:

代码: 全选

suco cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
重新配置你的xserver:

代码: 全选

$ sudo dpkg-reconfigure xserver-xorg
尝试再次重启gdm/gnome:

代码: 全选

$ startx 
如果它仍然不能启动,你应该手动编辑你的xorg.conf去解决问题:

代码: 全选

$ sudo pico /etc/X11/xorg.conf
或者在论坛发帖寻求帮助,并包含你的/var/log/Xorg.0.log

马上去了解一下你一次额外安装了什么:

代码: 全选

$ sudo debfoster
键入i是信息,h是帮助,p是清除,y是移走,n是不移走。

================================================== ==========================================

方案4)你想要一个占资源少又有着漂亮窗口管理器的internet网关

我已经摆弄xfce4足够时间了,有信心在我的internet 网关/文件服务器(正使用xfwm4和vncsever)上使用它作为我唯一的桌面环境。

它安装在./的大小只有771mb,./home挂载在另外一个分区。我也安装了J2SE和hugin lite(但不是从软件包)。我利用debfoster去“降级”我的ubuntu-base/ubuntu-desktop配置。

我用它来:
-下载
-从学校通过vncserver在我自己的电脑上工作
-samba文件服务器

这是我的 /var/lib/debfoster/keepers :

代码: 全选

amule
cgoban
debfoster
deborphan
firestarter
flashplayer-mozilla
gaim
gnugo
grub
grubconf
isag
linux-686
mozilla-firefox
nmap
prelink
python
raidtools2
samba
slocate
smbfs
ssh
swf-player
ubuntu-base
unrar
vncserver
xdiskusage
xfce4
xfce4-goodies
xfwm4
xserver-xorg 
好了,我们开始:
安装debfoster:

代码: 全选

$ sudo apt-get install debfoster
这是建立你最初的keepers文件:

代码: 全选

$ sudo debfoster -q 
现在编辑你的keepers文件:

代码: 全选

$ sudo pico /var/lib/debfoster/keepers
并至少改变它(这方案的IMO):

代码: 全选

debfoster
deborphan
firestarter
gaim
grub
linux-686
mozilla-firefox
prelink
samba
slocate
smbfs
ssh
ubuntu-base
xfce4
xfce4-goodies
xfwm4
xserver-xorg 
同样地包括你喜爱的应用程序。确保不要忘记你已经配置的其中一个,因为所有没列出的软件包都将会完全移走(包括配置文件)。
Gnome应用程序在Xfce4中看起来真的非常好!我没有尝试KDE应用程序,但他们应该也会工作得不错的。

现在我们前往init 1。确认我们不会损害正在运行的进程。

代码: 全选

$ sudo init 1
也要确保你备份了那些你自己编辑过的重要配置文件!

为了强制debfoster移走没在列表中列出的所有软件包,或者列表中这些软件包的依赖。(它也将添加列表中所有还没安装的软件包。因此,它会使你的系统遵守这一列表。)执行这个:

代码: 全选

$ sudo debfoster -f 
来自debfoster的manpage:
-f, --force
不会询问什么,并假定所有问题的答案都是“no”。如此强制你的系统利用debfoster数据库去完成工作,它也安装任何似乎缺少的软件包。如果你不小心,可能会有“有趣的”结果。
这之后,你的系统就与keepers文件兼容的。

为了启动你的xfce4,和进入init 2,执行这个:

代码: 全选

$ sudo init 2
如果xfce4不能启动,则执行:

代码: 全选

$ startxfce4
如果它仍然不能启动,你应该:
备份你的/etc/X11/xorg.conf:

代码: 全选

suco cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak


重新配置你的xserver:

代码: 全选

$ sudo dpkg-reconfigure xserver-xorg
尝试再次启动xfce4:

代码: 全选

$ startxfce4 
如果它仍然不能启动,你应该手动编辑你的xorg.conf去解决问题:

代码: 全选

$ sudo pico /etc/X11/xorg.conf
或者在论坛发帖寻求帮助,并包含你的/var/log/Xorg.0.log

马上了解一下你一次额外安装了什么:

代码: 全选

$ sudo debfoster
键入i是信息,h是帮助,p是清除,y是移走,n是不移走。

想配置samba和学习更多的有关知识,请检查www.ubuntuguide.org

看这里,有关怎么配置prelink:
http://www.ubuntuforums.org/showthr...ghlight=prelink
================================================== ================================

方案5)你想卸载kde和kubuntu全部文件,并回到ubuntu-desktop。

安装debfoster:

代码: 全选

$ sudo apt-get install debfoster
不询问问题建立keepers文件:

代码: 全选

$ sudo debfoster -q 
并编辑你的keepers文件:

代码: 全选

$ sudo pico /var/lib/debfoster/keepers
它看起来至少像这样(假设你的是686处理器和使用grub):

代码: 全选

ubuntu-base
ubuntu-desktop
linux-686
xserver-xorg
debfoster
grub 
同样地包括你喜爱的应用程序。确定不要忘记你已经配置的其中一个,因为所有没列出的软件包都将会完全移走(包括配置文件)。

你将要移走kubuntu-desktop和所有以k开头的、你知道是属于KDE并且不再需要的软件包。如果你的kubuntu-desktop破坏了,并且没有显示出来,别担心,它只是一个母体软件包。

确保移走kdebase,kdm,kdelibs,kdelibs4,如果他们在keepers文件里提到。也请保留所有在keepers文件提到并且你要使用的应用程序。你应该移走所有其他你不确定的行。

现在我们前往init 1。确认我们不会损害正在运行的进程。

代码: 全选

$ sudo init 1
也要确保你备份了那些你自己编辑过的重要配置文件!

为了强制debfoster移走没在列表中列出的所有软件包,或者列表中这些软件包的依赖。(它也将添加列表中所有还没安装的软件包。因此,它会使你的系统遵守这一列表。)执行这个:

代码: 全选

$ sudo debfoster -f 
来自debfoster的manpage:
-f, --force
不会询问什么,并假定所有问题的答案都是“no”。如此强制你的系统利用debfoster数据库去完成工作,它也安装任何似乎缺少的软件包。如果你不小心,可能会有“有趣的”结果。
这之后,你的系统就与keepers文件兼容的。

执行这个来重启你的gdm/gnome:

代码: 全选

$ sudo init 2
如果gdm不能启动,执行:

代码: 全选

$ startx
如果它仍然不能启动,你应该:

备份你的/etc/X11/xorg.conf:

代码: 全选

suco cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
重新配置你的xserver:

代码: 全选

$ sudo dpkg-reconfigure xserver-xorg


尝试再次重启gdm/gnome:

代码: 全选

$ startx
如果它仍然不能启动,你应该手动编辑你的xorg.conf去解决问题:

代码: 全选

$ sudo pico /etc/X11/xorg.conf
或者在论坛发帖寻求帮助,并包含你的/var/log/Xorg.0.log

马上了解一下你一次额外安装了什么:

代码: 全选

$ sudo debfoster
键入i是信息,h是帮助,p是清除,y是移走,n是不移走。

==========定稿,请指教!====================
独自看一看大海
总想起身边走在路上的朋友
Lenovo E290-420[Celeron-M420/256M/60G/Intel GMA950]
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#3

帖子 oneleaf » 2005-06-08 21:33

当净其意如虚空,远离妄想及诸取,令心所向皆无碍
watertest
帖子: 2
注册时间: 2005-12-29 15:36

#4

帖子 watertest » 2006-01-04 14:03

马上了解一下你一次额外安装了什么:

代码: 全选

$ sudo debfoster
键入i是信息,h是帮助,p是清除,y是移走,n是不移走。
man了一下debfoster
y是keep,保留
n是delete,删除
英文原文就弄反了
watertest
帖子: 2
注册时间: 2005-12-29 15:36

#5

帖子 watertest » 2006-01-04 14:05

Whenever debfoster asks you about a package, any of the following
responses can be given:

‘y’ Yes, keep the package. This is the default response.
‘n’ No, delete the package.
‘p’ Prune the package. This tells debfoster to also delete all
packages that are only installed because this package
depends on them. A list of such packages, if any, is shown
above the prompt.
‘s’ Skip this question. The next time you run debfoster it will
ask you again about this package.
‘h’ Print a help message.
‘i’ or ‘?’ Show information about the package.
‘u’ Undo last response.
‘q’ Exit without removing packages. All changes will be lost.
‘x’ Save changes to debfoster database, remove unwanted pack‐
ages, and exit without asking further questions.
头像
millenniumdark
论坛版主
帖子: 4159
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
联系:

#6

帖子 millenniumdark » 2006-07-29 14:56

原文的suco 应该是sudo吧
头像
millenniumdark
论坛版主
帖子: 4159
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
联系:

#7

帖子 millenniumdark » 2006-07-29 15:12

除了改动了suco以外,还改了四五处翻译的措词,加入了watertest的修正
http://wiki.ubuntu.org.cn/DebfosterHowto
回复