LoginSignup
0
0

More than 5 years have passed since last update.

Solaris10の不要パッケージをまとめて消す

Posted at

Solaris10の不要パッケージをまとめて消す

毎回pkgrmするのが面倒だったのでスクリプト化した。
root権限で実行してください

事前にいらないサービスを止めておく

inetadm -d svc:/application/graphical-login/cde-login
inetadm -d svc:/application/cde-printinfo
inetadm -d svc:/system/webconsole
inetadm -d svc:/network/rpc/cde-ttdbserver
inetadm -d svc:/network/rpc/cde-calendar-manager
などなど

remove_package.sh
#!/bin/sh
PACKAGE_LIST=/var/tmp/remove_packages

/usr/bin/pkginfo | /usr/bin/egrep "(SUNWmcon|SUNWmconr|SUNWjmctg|SUNWjmcon|SUNWmcos|SUNWmcosx|SUNWmctag|SUNWjat|APOC|X11|StarSuite|XScreenSaver|X Window|CDE|GNOME|Star Suit|ATOK|SUNWpl5|PostgreSQL|Mozilla|MySQL|Motif|PalmPilot|PCMCIA|RealPlayer|samba|Tomcat|X Server|motif|J2SDK|Apache|StarOffice|Sendmail|Netscape|PPP|Palm|JDS3|Wnn6|JAVAAPPS|JAI|MOZ17|FIREFOX|GLOW|G11NTOOLS|EVO146)" | awk '{print $2}' > ${PACKAGE_LIST}

/usr/bin/cat ${PACKAGE_LIST} | while read line
do
  /usr/bin/yes | /usr/sbin/pkgrm  ${line}
done

お好みでgrepしてるところのキーワードを適当に書き換えてください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0