HOWTO Get rid of GTK 1.x
From Gentoo Linux Wiki
Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc |
Nowadays, GTK+-1.x is not really required anymore to run an decent desktop. Despite that, because of a few packages which have not yet switched to 2.x, most users still get it installed. In this page, we will try to keep a list of those package which you should avoid or mark -gtk in your /etc/portage/package.use if you want to stay away from this deprecated toolkit.
Contents |
The tedious instructions
This section describes how to get rid of GTK+-1.x on your system. Although this HOWTO focuses on how to keep GTK+-1.x off of your system, the method described is easily applied to any other package(s) that you want to get rid of.
In the following HOWTO we assume that the user has both gtk and gtk2 set in his global USE flags. In other words, this HOWTO assumes that GTK+-1.x is currently installed on your system. However, if this is not the case, then the following steps will still prevent GTK+-1.x from being installed, your task will just be easier.
The first step is to mask GTK+-1.x on your system. Edit /etc/portage/package.mask and add the following lines:
<x11-libs/gtk+-2 <dev-libs/glib-2
Now, we will track down the packages which depend on this library. Type the following command:
# emerge -pe world
If any package depends on GTK+-1.x (or its GLib), emerge will give you an error message similar to the following:
!!! All ebuilds that could satisfy "=x11-libs/gtk+-1.2*" have been masked. !!! One of the following masked packages is required to complete your request: - x11-libs/gtk+-1.2.10-r10 (masked by: package.mask) - x11-libs/gtk+-1.2.10-r11 (masked by: package.mask) For more information, see MASKED PACKAGES section in the emerge man page or section 2.2 "Software Availability" in the Gentoo Handbook. !!! (dependency required by "net-analyzer/nmap-3.93" [ebuild])
So, net-analyser/nmap depends on GTK+-1.x: it's time to see whether this is an hard dependency or an optional dependency:
# equery uses net-analyzer/nmap [ Searching for packages matching net-analyzer/nmap... ] [ Colour Code : set unset ] [ Legend : Left column (U) - USE flags from make.conf ] [ : Right column (I) - USE flags packages was installed with ] [ Found these USE variables for net-analyzer/nmap-3.93 ] U I + + gtk : Adds support for x11-libs/gtk+ (The GIMP Toolkit) + + ssl : Adds support for Secure Socket Layer connections
Here we are lucky; GTK+ support seems to be optional (controlled by a USE flag). We can disable the gtk flag for this package, thanks to /etc/portage/package.use, and then go back to emerge to see what will be the next bugger:
# echo "net-analyzer/nmap -gtk" >> /etc/portage/package.use # emerge -pe world These are the packages that I would merge, in order: Calculating world dependencies \ !!! All ebuilds that could satisfy "=x11-libs/gtk+-1.2*" have been masked. !!! One of the following masked packages is required to complete your request: - x11-libs/gtk+-1.2.10-r10 (masked by: package.mask) - x11-libs/gtk+-1.2.10-r11 (masked by: package.mask) For more information, see MASKED PACKAGES section in the emerge man page or section 2.2 "Software Availability" in the Gentoo Handbook. !!! (dependency required by "www-client/dillo-0.8.5-r1" [ebuild])
So, now we have an issue with www-client/dillo. Again, we check whether its GTK+-1.x dependency is optional:
# equery uses www-client/dillo [ Searching for packages matching dillo... ] [ Colour Code : set unset ] [ Legend : Left column (U) - USE flags from make.conf ] [ : Right column (I) - USE flags packages was installed with ] [ Found these USE variables for www-client/dillo-0.8.5-r1 ] U I + + nls : <unknown> + + truetype : Adds support for FreeType and/or FreeType2 fonts + + ipv6 : Adds support for IP version 6 + + ssl : Adds support for Secure Socket Layer connections
Obviously, there is no way to remove Dillo's dependency on GTK+-1.x. But the world is full of other nice web browsers, we can probably live without this one (check, i.e., links, which can be used in X and display images). So we will apply the same method we used for GTK+-1.x: mask it and ensure that no other package depends on it. We will remove it at the last step, just in case there is something depending on GTK+-1.x we cannot live without, we would revert the following changes without the need of unmerging/reemerging. Also note that a newer (masked) version may be available, that depends on GTK2, so a
# ACCEPT_KEYWORDS="~x86" emerge -p www-client/dillo
is recommended. However, it is not the case here. If it were (let us take easytag for example)
# ACCEPT_KEYWORDS="~x86" emerge -p media-sound/easytag # echo 'media-sound/easytag' >> /etc/portage/package.keywords # emerge -au media-sound/easytag
and skip the next few paragraphs.
We must also remove it from our world file:
# sed -i '\:^www-client/dillo$:d' /var/lib/portage/world # echo "www-client/dillo" >> /etc/portage/package.mask # emerge -pe world These are the packages that I would merge, in order: Calculating world dependencies \ !!! All ebuilds that could satisfy "www-client/dillo" have been masked. !!! One of the following masked packages is required to complete your request: - www-client/dillo-0.8.4-r1 (masked by: package.mask) - www-client/dillo-0.7.3-r7 (masked by: package.mask) - www-client/dillo-0.8.4-r2 (masked by: package.mask) - www-client/dillo-0.8.5 (masked by: package.mask) - www-client/dillo-0.8.5-r1 (masked by: package.mask) For more information, see MASKED PACKAGES section in the emerge man page or section 2.2 "Software Availability" in the Gentoo Handbook. !!! (dependency required by "mail-client/sylpheed-claws-1.9.14" [ebuild])
Oh oh, seems like having masked Dillo now gives us more trouble... Let's see if that dependency is optional:
# equery uses mail-client/sylpheed-claws ... + + dillo : Enables support for inline http email viewing with a plugin (which depends on the dillo browser) ...
Ok, so it is optional. We can now disable the dillo flag for mail-client/sylpheed-claws in /etc/portage/package.use, and continue our quest for packages depending (directly or not) on GTK+-1.x. This process may take quite some time if you have many packages installed. To speed up the process we provide you with some ready-to-use /etc/portage/package.mask and /etc/portage/package.use files in the following, so that you don't have to do this search by yourself.
We continue this process until emerge -pe world produces no errors. At this point we rebuild all the packages for which the USE flags have been changed and then unmerge all the packages that we have masked:
# emerge --ask --newuse world # emerge --ask -C "<x11-libs/gtk+-2" "<dev-libs/glib-2" www-client/dillo ...
From here, your system should be free of GTK-1.x. However, you may want to execute emerge depclean though (do it with care, as usual), as a final check to get rid of any remaining GTK+-1.x dependencies followed by revdep-rebuild to ensure we have not broken any hidden runtime dependencies:
# emerge --ask depclean # revdep-rebuild -p
package.mask
This is an /etc/portage/package.mask which hides various packages related to GTK+-1.x or having hard dependencies on it. Sure, it may be incomplete or lying for a few packages, so please people, don't hesitate to edit this page to make it better.
# Main anti-gtk1 mask: <dev-cpp/gtkmm-2 <dev-libs/glib-2 media-libs/gdk-pixbuf <x11-libs/gtk+-2 # Base gnome-1.4 stuffs: dev-libs/libole2 gnome-base/bonobo <gnome-base/control-center-2 <gnome-base/eel-2 <gnome-base/gconf-2 <gnome-base/gdm-2.4 gnome-base/gnome-core gnome-base/gnome-libs <gnome-base/gnome-panel-2 gnome-base/gnome-print <gnome-base/librsvg-2 <gnome-base/orbit-2 gnome-extra/bonobo-conf <gnome-extra/bug-buddy-2.4 <gnome-extra/gal-2 <gnome-extra/gnome-games-2 gnome-extra/gnome-network gnome-extra/guppi gnome-extra/libgail-gnome # Random packages you won't be able to merge # without glib1, gtk1 or gdk-pixbuf: app-admin/gps app-admin/gpsui app-admin/otpcalc app-admin/pcihpview app-admin/usbview app-admin/xsu app-arch/guitar app-cdr/gcombust app-cdr/gtoaster app-cdr/nero app-cdr/simplecdrx app-crypt/quintuple-agent app-dicts/babytrans app-editors/beaver <app-editors/ghex-2 app-editors/gnotepad+ app-emulation/libspectrum <app-emulation/vmware-workstation-4 app-emulation/xwine app-i18n/jmode <app-i18n/kanjipad-2 <app-laptop/gtkpbbuttons-0.6 app-misc/dfm app-misc/emelfm app-misc/endeavour app-misc/gato app-misc/gentoo app-misc/gfontview <app-misc/gpsdrive-2 app-misc/gtktalog app-misc/ithought app-misc/mtoolsfm app-misc/rio500 app-misc/sjog app-mobilephone/gscmxx app-mobilephone/gtkesms app-office/gbib app-office/gnucash app-office/lahelper <app-office/mdbtools-0.5 <app-office/ooodi-0.68 app-text/gsview <app-text/gtranslator-1 app-text/manedit app-text/tex-guy dev-lang/lazarus dev-libs/libstroke <dev-ml/lablgtk-2 dev-perl/gtk-perl dev-perl/gtk-perl-glade dev-php/php-gtk dev-php4/php-gtk dev-python/bonobo-python <dev-python/gnome-python-1.99 <dev-python/orbit-python-1.99 <dev-python/pygtk-2 dev-python/python-gtkextra dev-python/visual dev-ruby/ruby-gconf dev-ruby/ruby-gdkimlib dev-ruby/ruby-gtk dev-ruby/ruby-libglade dev-util/gcvs <dev-util/gob-2 <dev-util/glade-2 <dev-util/glademm-2 dev-util/sashxb <dev-util/screem-0.6 dev-util/xdelta dev-util/glimmer games-action/bombermaze games-arcade/xbill games-board/eboard games-board/gnono games-board/mah-jong games-emulation/epsxe games-emulation/gnomame games-emulation/grustibus <games-puzzle/mindless-1.6 games-emulation/gtuxnes games-emulation/infones games-emulation/pcsx2 games-emulation/ps2emu-cddvdlinuz games-emulation/ps2emu-cdvdiso games-emulation/ps2emu-dev9null games-emulation/ps2emu-gssoft games-emulation/ps2emu-padxwin games-emulation/ps2emu-spu2null games-emulation/ps2emu-usbnull games-emulation/psemu-cdriso games-emulation/psemu-padjoy games-emulation/psemu-padxwin games-emulation/psemu-peopssoftgpu games-emulation/psemu-peopsspu games-fps/vendetta-online-bin games-kids/gtans games-kids/lletters games-kids/matritsa games-kids/stickers games-misc/groach games-misc/gtklife games-mud/gMOO games-puzzle/codebreaker games-puzzle/glickomania >=games-rpg/vegastrike-0.4 games-simulation/cannonsmash games-simulation/corewars games-strategy/xarchon kde-base/dcopc kde-base/xparts <mail-client/balsa-2 <mail-client/evolution-2 mail-client/gbuffy mail-client/spruce <mail-client/sylpheed-1.9 <mail-client/sylpheed-claws-1.9.13-r1 media-gfx/autotrace media-gfx/danpei <media-gfx/eog-2 <media-gfx/gimp-2 media-gfx/gnome-iconedit <media-gfx/gthumb-2 media-gfx/gtksee media-gfx/iv media-gfx/k3d <media-gfx/sodipodi-0.29 media-gfx/truevision media-gfx/xzgv <media-libs/imlib-1.9.15 media-libs/libmovtar media-libs/openquicktime media-plugins/eq-xmms media-plugins/xmms-adplug media-plugins/xmms-alarm media-plugins/xmms-alsa media-plugins/xmms-arts media-plugins/xmms-blur-scope media-plugins/xmms-blursk media-plugins/xmms-btexmms media-plugins/xmms-cdaudio media-plugins/xmms-cdcover media-plugins/xmms-cdread media-plugins/xmms-coverviewer media-plugins/xmms-crossfade media-plugins/xmms-crystality media-plugins/xmms-dflowers media-plugins/xmms-disk-writer media-plugins/xmms-dscope media-plugins/xmms-dspectogram media-plugins/xmms-dspectral media-plugins/xmms-echo media-plugins/xmms-esd media-plugins/xmms-extra media-plugins/xmms-fc media-plugins/xmms-find media-plugins/xmms-finespectrum media-plugins/xmms-fmradio media-plugins/xmms-gdancer media-plugins/xmms-goom media-plugins/xmms-idcin media-plugins/xmms-imms media-plugins/xmms-infinity media-plugins/xmms-infopipe media-plugins/xmms-ir media-plugins/xmms-iris media-plugins/xmms-itouch media-plugins/xmms-jack media-plugins/xmms-jess media-plugins/xmms-joystick media-plugins/xmms-kde media-plugins/xmms-kjofol media-plugins/xmms-ladspa media-plugins/xmms-libvisual media-plugins/xmms-lirc media-plugins/xmms-liveice media-plugins/xmms-liveplugin media-plugins/xmms-lyrc media-plugins/xmms-mad media-plugins/xmms-midi media-plugins/xmms-mikmod media-plugins/xmms-morestate media-plugins/xmms-mp3cue media-plugins/xmms-mpg123 media-plugins/xmms-musepack media-plugins/xmms-nas media-plugins/xmms-nebulus media-plugins/xmms-nsf media-plugins/xmms-null media-plugins/xmms-oggre media-plugins/xmms-opengl-spectrum media-plugins/xmms-oss media-plugins/xmms-outpost media-plugins/xmms-pipe media-plugins/xmms-realrandom media-plugins/xmms-repeatit media-plugins/xmms-sanalyzer media-plugins/xmms-scrobbler media-plugins/xmms-shell media-plugins/xmms-shn media-plugins/xmms-sid media-plugins/xmms-smpeg media-plugins/xmms-sndfile media-plugins/xmms-song-change media-plugins/xmms-spc media-plugins/xmms-status-plugin media-plugins/xmms-stereo media-plugins/xmms-synaesthesia media-plugins/xmms-tfmx media-plugins/xmms-tonegen media-plugins/xmms-voice media-plugins/xmms-volnorm media-plugins/xmms-vorbis media-plugins/xmms-wakeup media-plugins/xmms-wav media-plugins/xmms-wma media-plugins/xmms-wmdiscotux media-plugins/xmms-xf86audio media-plugins/xmms-xmmsd media-plugins/xmms-xmmsmplayer media-radio/ssbd media-radio/xconvers media-sound/ardour media-sound/cantus media-sound/demolition media-sound/denemo media-sound/digitaldj <media-sound/easytag-1.99 media-sound/extace media-sound/freebirth <media-sound/galan-0.2.99 <media-sound/gqmpeg-0.90 <media-sound/gqradio-1.9 media-sound/gradio media-sound/gtkguitune media-sound/opmixer media-sound/playspc_gtk media-sound/psindustrializer media-sound/ripperx media-sound/smurf media-sound/sonic-rainbow media-sound/soundtracke media-sound/sulu media-sound/swami media-sound/sweep media-sound/xmms media-sound/yconsole <media-tv/zapping-0.7 media-video/bcast media-video/cinepaint media-video/drip media-video/gqcam media-video/gsubedit media-video/linuxvideostudio media-video/mpeg2-movie media-video/nvoption <media-video/ogle-gui-0.9.2 media-video/piave media-video/xmovie media-video/xmps net-analyzer/cheops-ng <net-analyzer/etherape-0.9 net-analyzer/mbrowse net-analyzer/nomad net-analyzer/scli net-analyzer/traffic-vis net-analyzer/xtraceroute net-dialup/gcdial net-dialup/xlc net-dns/dnsquery <net-libs/libfwbuilder-2 net-libs/soup <net-firewall/fwbuilder-2 net-firewall/gtk-iptables net-ftp/axyftp net-ftp/deadftp net-im/aim net-im/ayttm net-im/everybuddy net-im/gnophone net-im/ickle net-im/silc-client net-im/ymessenger <net-irc/xchat-2 <net-misc/aria-1 net-misc/bidwatcher net-misc/cisco-aironet-client-utils <net-misc/d4x-2.4 net-misc/gtkesms net-misc/gtm net-misc/LinNeighborhood net-misc/sambasentinel net-misc/xfsamba net-p2p/dctc <net-nds/gq-0.99 net-p2p/fidelio net-p2p/gnapster <net-p2p/gnunet-0.6 net-p2p/gtkhx net-p2p/lopster net-p2p/napshare <net-print/gtklp-1 net-print/pup <net-wireless/airsnort-0.2.3 <net-wireless/bluez-hciemu-1.2 net-wireless/gtkskan net-wireless/irda-utils net-www/bk_edit sci-calculators/calcoo sci-calculators/snac <=sci-chemistry/chemtool-1.6.3 <sci-chemistry/gperiodic-2 sci-electronics/geda sci-electronics/gerbv sci-electronics/gtkwave sci-electronics/gwave <sci-electronics/oregano-0.40 sci-mathematics/euler sci-misc/lightspeed sci-misc/oww sys-apps/gscanbus sys-cluster/heartbeat <sys-libs/pam-0.78 www-client/ci www-client/dillo www-client/gorua www-client/netscape x11-libs/buffy x11-libs/gtkDPS x11-libs/gtk+extra <x11-libs/gtkglarea-1.99 x11-libs/guile-gtk <x11-libs/rep-gtk-0.17 x11-misc/bbrb <x11-misc/bbrun-1.6 x11-misc/bubblemon x11-misc/e16keyedit x11-misc/e16menuedit x11-misc/fluxconf x11-misc/gclipper x11-misc/gpasman x11-misc/grpn x11-misc/grun <x11-misc/gwhere-0.1.6 x11-misc/lineakconfig x11-misc/ntodo <x11-misc/root-portal-0.5 x11-misc/whitebox <x11-misc/wmakerconf-2.11 x11-misc/xalf x11-misc/xdialog <x11-misc/xsensors-0.40 x11-misc/yawmppp x11-plugins/gkrellm-alltraxclock x11-plugins/mountapp x11-plugins/wmalbum x11-plugins/wmcliphist x11-plugins/wmclockmon x11-plugins/wmdeskguide x11-plugins/wmdrawer x11-plugins/wmfishtime x11-plugins/wmmaiload x11-plugins/wmmsg x11-plugins/wmpop x11-plugins/wmspaceclock <x11-plugins/wmtimer-2.9 x11-plugins/yawmppp x11-terms/multi-gnome-terminal <x11-themes/gtk-engines-2 x11-themes/gtk-engines-begtk <x11-themes/gtk-engines-cleanice-1.2 x11-themes/gtk-engines-eazel <x11-themes/gtk-engines-flat-2 x11-themes/gtk-engines-gtkstep x11-themes/gtk-engines-icegradient x11-themes/gtk-engines-industrial <x11-themes/gtk-engines-lighthouseblue-0.7 x11-themes/gtk-engines-mac2 <x11-themes/gtk-engines-metal-1.9 x11-themes/gtk-engines-mist x11-themes/gtk-engines-notif x11-themes/gtk-engines-notif2 x11-themes/gtk-engines-pixmap x11-themes/gtk-engines-raleigh <x11-themes/gtk-engines-redmond95-1.9 x11-themes/gtk-engines-smooth <x11-themes/gtk-engines-thinice-2 x11-themes/gtk-engines-xenophilia <x11-themes/gtk-theme-switch-1.9 x11-themes/mandrake-artwork x11-themes/qtpixmap <x11-themes/ximian-artwork-0.2.32 x11-themes/xmms-themes x11-wm/oroborus-extras <x11-wm/sawfish-1.3 <x11-wm/selectwm-0.4 # Actually masked for x86 only, probably fine on other arches: www-client/mozilla-bin # Ebuild with wrong deps on glib1 or gdk-pixbuf. # Watch them, they may get fixed: app-admin/gkrellm dev-embedded/gnusim8085
package.use
And now, here is an /etc/portage/package.use which should disable most GTK+-1.x dependencies where they are optionnal. Again, feel free to edit it when you find missing or wrong entries. as with the most recent version you can make /etc/portage/package.use into a directory and then make a file called gtk1 in it where you can put the the lines below in and keep them separated from the rest
app-admin/powertweak -gtk <=app-editors/mp-3.3.1 -gtk app-editors/xemacs-gtk -gtk app-emulation/basiliskII -gtk app-laptop/toshiba-utils -gtk app-misc/twin -gtk app-mobilephone/gnokii -X app-text/ghostscript-afpl -gtk app-text/ghostscript-gnu -gtk app-text/gocr -gtk dev-db/edb -gtk dev-db/libiodbc -gtk dev-lang/R -gtk dev-lang/pike -gtk dev-lang/gwydion-dylan -gtk dev-util/pilrc -gtk games-emulation/darcnes -gtk games-emulation/generator -gtk games-roguelike/angband -gtk games-roguelike/crossfire-client -gtk games-roguelike/zangband -gtk games-rpg/eternal-lands -mapeditor games-strategy/xscorch -gtk mail-client/sylpheed-claws -dillo media-gfx/gimp-print -gtk media-gfx/surf -gtk media-libs/imlib -gtk media-libs/janus -gtk media-libs/libdv -gtk media-libs/libjsw -gtk media-libs/libquicktime -gtk media-libs/smpeg -gtk media-libs/yiff -gtk media-sound/alsaplayer -gtk media-sound/alsa-tools -X media-sound/aylet -gtk media-sound/lame -gtk media-sound/mp3info -gtk media-sound/muse -gtk media-sound/playmidi -gtk media-video/mjpegtools -gtk media-video/mplayer -gtk media-video/transcode -gtk media-video/tuxzap-programs -gtk <media-video/vlc-0.8.1 -gtk media-video/xvattr -gtk net-analyzer/driftnet -gtk net-analyzer/hydra -gtk =net-analyzer/mtr-0.54* -gtk net-analyzer/nmap -gtk net-dialup/gnokii -X net-dialup/ppp -gtk net-im/gtalk -gtk net-irc/bitchx -gtk net-misc/asterisk -gtk net-misc/ipsorcery -gtk net-misc/putty -gtk <net-misc/sitecopy-0.15 -gnome <net-p2p/gnunet-0.7 -gtk net-p2p/teknap -gtk net-print/pdq -gtk net-www/amaya -gtk net-www/netscape-flash -gtk sci-astronomy/predict -gtk <sci-mathematics/scilab -gtk sys-devel/subterfugue -gtk sys-fs/evms -gtk sys-fs/ocfs-tools -gtk www-client/amaya -gtk =www-client/w3m-0.4.2 -gtk x11-misc/xlockmore -gtk x11-plugins/wmmenu -gnome x11-themes/redhat-artwork -gtk x11-wm/fvwm -gtk # Ebuilds with wrong optionnal deps on gdk-pixbuf. # Watch them, they may get fixed: dev-java/gnu-classpath -gtk dev-java/sablevm -gtk net-nds/gq -jpeg
The straightforward instructions
Checking you really want to do it
First step is to check whether you really can live without GTK+-1.x. Copy the above package.mask to a temporary file, let's say /tmp/nogtk1.mask, and check output of the following command:
# emerge -pC $(sed '/^[[:blank:]]*#/d' /tmp/nogtk1.mask)
It should list packages which have to be uninstalled. Read that list carefully, and if you see any application you can't live without, then forget about uninstalling GTK+-1.x.
Alternatively, check the output of the following commands:
# revdep-rebuild --library=/usr/lib/libgtk-1.2.so.0 -pv # revdep-rebuild --library=/usr/lib/libglib-1.2.so.0 -pv
Fixing packages USE flags
Second step is to fix your global and local USE flags, and to rebuild packages for which they have change:
- make sure you have -xmms in your /etc/make.conf. Other global flags like gnome or gtk are fine, you can safely leave them turned on.
- merge the above package.use with your already existing /etc/portage/package.use (if any). Beware that appending it at the end of your own file may not be perfectly correct: you can't speak of a same package on several lines of package.use, so if you already have entries about some of the above packages, you will have to merge them on a single line.
- rebuild package whose USE flags have been changed:
# emerge -v --ask --newuse world
Unmerging obsolete packages
Third step is to actually cleanup your system of all GTK+-1.x related packages:
# emerge --ask -C $(sed '/^[[:blank:]]*#/d' /tmp/nogtk1.mask)
Checking your system is consistent
Last step is to check that everything went fine:
- merge the above package.mask (now /tmp/nogtk1.mask) in your own /etc/portage/package.mask.
- try this command and pray for no error:
# emerge -pe world
In case there are errors here because of dependencies on some masked packages, then it means that the above package.mask or package.use still have some mistakes or are incomplete. See the tedious instructions for how to track the problem and fix it. And please fix this page too while you're at it.
Finally, once emerge -pe world is happy, you can try a revdep-rebuild (you already have app-portage/gentoolkit installed, don't you?), to be sure that there are no hidden broken dependencies:
# revdep-rebuild -p
Optional: cleanup package.*
It is safe to keep all the noise you've added to your package.mask or package.use, but if you really want, you can have fun cleaning them up:
- for package.mask, the best is probably to only keep the first sections about GTK+-1.x and Gnome-1.x libraries. It should be enough to make sure you won't reinstall any of these in the future.
- for package.use, there is no such easy way. Just read the file, and delete entries about packages you don't have installed and you're sure you will never install.