-
Senior Member
registered user
Purging packages from the 7.0.5DVD, installing previous package selections
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Cisco Catalyst C9300-24UX-A 24 Port 10G/mGig UPOE Network Switch, no module
$299.97
Fortinet FortiSwitch FS-124D-POE 24 Port Gigabit Ethernet Switch UNREGISTERED
$99.97
ARUBA J9772A 2530-48G PoE+ 48 PORT ETHERNET SWITCH W/ RACK EARS J9772-60301
$125.69
NetGear ProSafe GS748T V4 48-Port Gigabit Smart Switch w/ Ears
$35.00
NETGEAR GS305300PAS 5 Port Gigabit Ethernet Unmanaged Switch
$15.99
New Linksys SE3005 5-port Gigabit Ethernet Switch
$18.99
Linksys SE3008 8 Ports Rack Mountable Gigabit Ethernet Switch
$21.99
Cisco SG300-10P 10x PoE RJ45 Gigabit Switch SRW2008P-K9 V03 + Power Adapter
$34.99
HP JG937A Flexnetwork 5130-48G PoE+ 48-Port Gigabit Network Switch
$59.99
Dell X1018 X-Series Smart Managed Switches 16-Port Gigabit 2-Port SFP Switch
$65.00