こちらのサイトを参考にすると綺麗に消せるかな?と実施
http://d.hatena.ne.jp/hirokiky/20110801/1312217746
pkgutil --pkgs
とやればパッケージ一覧が出せる
mysqlで結果をしぼる
pkgutil --pkgs|grep -i mysql
sudo pkgutil --unlink com.mysql.launchd sudo pkgutil --forget com.mysql.launchd sudo pkgutil --unlink com.mysql.prefpane sudo pkgutil --forget com.mysql.prefpane sudo pkgutil --unlink com.mysql.mysql sudo pkgutil --forget com.mysql.mysql
これだけだとバイナリが残っているみたいなので、まるっと捨てる
sudoのrmは怖いですが
sudo rm -rf /usr/local/mysql sudo rm -rf /usr/local/mysql-5.7.11-osx10.9-x86_64
これが何をやってるのかな?と調べてみると--unlinkはsnowleopard以降は無効らしくHELPをひいても書いてないので、意味ないと思う。
$ pkgutil
Usage: pkgutil [OPTIONS] [COMMANDS] ...
Options:
--help Show this usage guide
--verbose, -v Show contextual information and format for easy reading
--force, -f Perform all operations without asking for confirmation
--volume PATH Perform all operations on the specified volume
--edit-pkg PKGID Adjust properties of package PKGID using --learn PATH
--only-files List only files (not directories) in --files listing
--only-dirs List only directories (not files) in --files listing
--regexp Try all PKGID arguments as regular expressions
Receipt Database Commands:
--pkgs, --packages List all currently installed package IDs on --volume
--pkgs-plist List all package IDs on --volume in plist format
--pkgs=REGEXP List package IDs on --volume that match REGEXP
--groups List all GROUPIDs on --volume
--groups-plist List all GROUPIDs on --volume in plist format
--group-pkgs GROUPID List all PKGIDs in GROUPID
--files PKGID List files installed by the specified package
--lsbom PKGID List files in the same format as 'lsbom -s'
--pkg-groups PKGID List all GROUPIDs that PKGID is a member of
--export-plist PKGID Print all info about PKGID in plist format
--verify PKGID Verify file permissions of the specified package
--repair PKGID Repair file permissions of the specified package
--pkg-info PKGID Show metadata about PKGID
--pkg-info-plist PKGID Show metadata about PKGID in plist format
--file-info PATH Show metadata known about PATH
--file-info-plist PATH Show metadata known about PATH in plist format
--forget PKGID Discard receipt data for the specified package
--learn PATH Update --edit-pkg PKGID with actual metadata from PATH
File Commands:
--expand PKG DIR Expand the flat package PKG to DIR
--flatten DIR PKG Flatten the files at DIR as PKG
--bom PATH Extract any Bom files from the pkg at PATH into /tmp
--payload-files PATH List the paths archived within the (m)pkg at PATH
結論としては
sudo pkgutil --forget com.mysql.launchd sudo pkgutil --forget com.mysql.prefpane sudo pkgutil --forget com.mysql.mysql
sudo rm -rf /usr/local/mysql sudo rm -rf /usr/local/mysql-5.7.11-osx10.9-x86_64
でいいかと思う
あと細かいゴミ
$ pkgutil --files com.mysql.launchd ._com.oracle.oss.mysql.mysqld.plist com.oracle.oss.mysql.mysqld.plist
これはみつからない、どこにあるんだろ?
設定アプリのmysql
$ pkgutil --files com.mysql.prefpane MySQL.prefPane MySQL.prefPane/Contents MySQL.prefPane/Contents/Info.plist MySQL.prefPane/Contents/MacOS MySQL.prefPane/Contents/MacOS/MySQL MySQL.prefPane/Contents/Resources MySQL.prefPane/Contents/Resources/English.lproj MySQL.prefPane/Contents/Resources/English.lproj/InfoPlist.strings MySQL.prefPane/Contents/Resources/English.lproj/Localizable.strings MySQL.prefPane/Contents/Resources/English.lproj/MySQLStartupPref.nib MySQL.prefPane/Contents/Resources/English.lproj/MySQLStartupPref.nib/objects.nib MySQL.prefPane/Contents/Resources/MySQLStartupPref.tiff MySQL.prefPane/Contents/Resources/Spanish.lproj MySQL.prefPane/Contents/Resources/Spanish.lproj/Localizable.strings MySQL.prefPane/Contents/Resources/instance_started.png MySQL.prefPane/Contents/Resources/instance_stopped.png MySQL.prefPane/Contents/Resources/mahelper MySQL.prefPane/Contents/Resources/mysql_logo.png MySQL.prefPane/Contents/Resources/pt.lproj MySQL.prefPane/Contents/Resources/pt.lproj/Localizable.strings MySQL.prefPane/Contents/_CodeSignature MySQL.prefPane/Contents/_CodeSignature/CodeResources
このへんを探して消せば完璧。
ちなみに設定アプリの項目はここにある
/Library/PreferencePanes
こちらのサイトの最後のスクリプトで、楽にできるのかな?試してません
http://qiita.com/xxthermidorxx/items/2202b483cd068ec824eb