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:

Code:
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.

Code:
# 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:

Code:
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
Code:
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

Code:
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.