PDA

View Full Version : Purging packages from the 7.0.5DVD, installing previous package selections



Capricorny
01-08-2013, 12:03 PM
Most of this has been posted earlier, but here it is, checked for 7.0.5.

To make room for other programs in a remastering, purging is needed. Everything isn't equally safe to purge, but games, some documentation and some language support is usually safe. We can also always reinstall something should things go wrong.

To find out what takes the most space, we can issue a command like this:


dpkg-query -W --showformat='${Installed-Size} ${Section} ${Package}\n' | sort -n > knx705_DVDpack_size.txt


Looking at the end of the file created, we can check if the packages taking up the most space are really things we need to have installed. Just remember that nowadays, a program often comes as a set of packages, and every package of that set being small doesn't guarantee that the totality is.

This is my main list of purges. It can be put in a shell script and executed at once, but I prefer to run the lines one by one. Also, it may be a good idea to omit the "-y" command, to be able to stop a purging in process - aptitude tells what it has figured out to do, and gives you the choice to not accept it.


# Purging 7.0.5 DVD
sudo aptitude -y purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^games | cut -d' ' -f2`
sudo aptitude -y purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep bacula | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^editors | grep lyx | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^editors | grep abiword | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^gnome | grep gnucash | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^gnome | grep nautilus | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^mail | grep kmail | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^mail | grep icedove | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^utils | grep amanda | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^web | grep chromium | cut -d' ' -f2`
sudo aptitude -y purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^kde | grep l10n | cut -d' ' -f2`
sudo aptitude -y purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^graphics | grep inkscape | cut -d' ' -f2`
sudo aptitude -y purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^graphics | grep scribus-ng | cut -d' ' -f2`
sudo aptitude -y purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep ^doc | grep gimp-help-de | cut -d' ' -f2`
In addition, to make room for more Java servers etc, I do some extra purging, like:


sudo aptitude -y purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep openshot | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep oxygencursors | cut -d' ' -f2`
sudo aptitude purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep gnome-user-guide | cut -d' ' -f2`
sudo aptitude -y purge `dpkg-query -W --showformat='${Section} ${Package}\n' | grep qt4-demos | cut -d' ' -f2`
When it is all done, it's time for some install. This is a way to recover, as far as possible, an earlier selection of packages - in this case the extra R and math packages I installed with 6.4.4, the selection list was then written to disk with the command

dpkg-query -W --showformat='${Section} ${Package}\n' | sort -n > knx644_64_sqpack_sect1.txt
in the packlists subdirectory.

Now, I can recover parts of that selection by using this type of command


sudo aptitude install `cat packlists/knx644_64_sqpack_sect1.txt | grep ^gnu-r | cut -d' ' -f2`
sudo aptitude install `cat packlists/knx644_64_sqpack_sect1.txt | grep ^math | cut -d' ' -f2`


It turned out, that the math category from that install would now occupy ca 350MB extra - I therefore decided to wait and go for a smaller selection.

dunnthebum
01-10-2013, 01:21 AM
In synaptic, I came across debfoster as being installed and its description looked useful so i ran it from the terminal. The first item to come up is bluez-utils that is keeping 33 packages installed. Why can't I see that in my installed packages? Is there a debfoster command that tells me what package is keeping bluez-utils installed? Is bluez-utils useful? thanks for any guidance

dunnthebum
01-10-2013, 01:30 AM
sorry guys, was looking in the wrong section for bluez-utils in Synaptic. Found it and removed it (dont need bluetooth support. Why was it included in the first place? Does knoppix know that my comp supports bluetooth?

Capricorny
01-10-2013, 11:13 AM
sorry guys, was looking in the wrong section for bluez-utils in Synaptic. Found it and removed it (dont need bluetooth support. Why was it included in the first place? Does knoppix know that my comp supports bluetooth?
Both the CD and, in particular, the DVD version of Knoppix contains loads of programs you will not use - but someone needs it, like bluetooth support. If you install the debtree package, you can see dependencies. Try (with bluez-utils installed) the pipe



debtree bluez-utils | dot -Tps | okular - &


You may be astonished :)

dunnthebum
01-10-2013, 02:02 PM
on installing debtree:

dunnthebum
01-10-2013, 02:08 PM
sorry, cut & paste didnt work. Here it is using 'insert inline' hope it can be read164

Capricorny
01-10-2013, 02:33 PM
I had no problems installing debtree with Synaptic on a thorougly purged 7.0.5 DVD version.
So it's no general error, at least.

Capricorny
01-13-2013, 12:18 PM
After having done a couple of 7.0.5 remasterings after different levels of purging, I think I have to warn, generally, against purging. Too many packages are removed, and worse still, reinstalling the dysfunctional programs doesn't always fix the problems. I have still not been able to get konqueror up and running, even with no extensive purging of KDE packages. This is a new problem, the same methods have worked fine on earlier Knoppix releases. It is also quite frustrating to have a system that seems to work well, but then suddenly something is broken, and the standard ways to fix it don't work. So, if KK would leave about a GB worth of space on the DVD (about the size of installed games), it would be very helpful to us who need to remaster to accomodate large extra installs. Purging used to be a safe and nice thing to do, I can't say it is anymore.

dwstarke
01-14-2013, 04:40 PM
After having done a couple of 7.0.5 remasterings after different levels of purging, I think I have to warn, generally, against purging. Too many packages are removed, and worse still, reinstalling the dysfunctional programs doesn't always fix the problems. I have still not been able to get konqueror up and running, even with no extensive purging of KDE packages. This is a new problem, the same methods have worked fine on earlier Knoppix releases. It is also quite frustrating to have a system that seems to work well, but then suddenly something is broken, and the standard ways to fix it don't work. So, if KK would leave about a GB worth of space on the DVD (about the size of installed games), it would be very helpful to us who need to remaster to accomodate large extra installs. Purging used to be a safe and nice thing to do, I can't say it is anymore.

I am one of those who have tried to pare Knoppix down to a minimal size, in order to then construct a customized, modular Knoppix using the ramdisk KNOPPIX 2-9 method. I might suggest, that a minimal Knoppix need only be created once and that anyone who has such a beast made from 7.0.5 and would share it would probably have the undying gratitude of those of us who are struggling with this.

Along this line, is it possible to include the 64 bit kernel with the cd version in order to boot into 64-bit or are there other components necessary? Is it as simple as copying over the kernel file from the DVD? Creating a minimal version might be easier, starting from the smaller footprint cd, but no 64-bit is a non-starter for me.

I appreciate any and all insights into this.

Capricorny
01-14-2013, 05:10 PM
I am one of those who have tried to pare Knoppix down to a minimal size, in order to then construct a customized, modular Knoppix using the ramdisk KNOPPIX 2-9 method. I might suggest, that a minimal Knoppix need only be created once and that anyone who has such a beast made from 7.0.5 and would share it would probably have the undying gratitude of those of us who are struggling with this.

Along this line, is it possible to include the 64 bit kernel with the cd version in order to boot into 64-bit or are there other components necessary? Is it as simple as copying over the kernel file from the DVD? Creating a minimal version might be easier, starting from the smaller footprint cd, but no 64-bit is a non-starter for me.

I appreciate any and all insights into this.

The only really safe way I know about, is debootstrap. Morphing that into a knxbootstrap would be very useful, but personally, I'm not going to try it now. I have found out that it is more fruitful to concentrate on squashfs remasterings and avoid that somewhat artificial 4GB limit. On my DVD-based system, package linux-image-3.6.11-64 is installed - have you tried to install that in a CD-based system? I have had some success running 64 bits in a chrooted debootstrap version.

Capricorny
01-17-2013, 07:12 PM
Update: When being careful and not purging any KDE/GNOME "central" packages, plus checking the suggested purging solutions before committing, it seems to go fairly well purging ca 1.5GB worth of programs. It turns out that several of the problems encountered upon remastering 7.0.2-7.0.5, disappear if I write /home + /var to the new persistent image, taking up a few hundred megabytes there. I don't know what this is, maybe something with aufs - but at least it now seems to work like it used to before. One should note that this isn't that much of a loss in practice, as /var will be populated with apt data as soon as we start updating and installing packages. When these data are already written to persistent store in the remastering process, updating will not take som much extra space.