Wednesday, March 21, 2007
Stripping down a Gentoo based distro
Having played with the somewhat bloated (but beautiful looking) Sabayon Gentoo distro, I wanted to quickly strip down some of the fat so I wrote this little bash script (killpkg.sh) for removing packages en masse.
#!/bin/bash
# usage: killpkg.sh media-tv
for PKG in `egrep $1 /var/lib/portage/world` ; do
emerge --unmerge $PKG
done
The nice thing is that it accepts regular expressions thanks to egrep. But use it carefully, as it could easily make a distro unbootable.
#!/bin/bash
# usage: killpkg.sh media-tv
for PKG in `egrep $1 /var/lib/portage/world` ; do
emerge --unmerge $PKG
done
The nice thing is that it accepts regular expressions thanks to egrep. But use it carefully, as it could easily make a distro unbootable.