今回はちょっとしたプログラミングネタを。
「Ruby」というプログラミング言語があるのですが、Rubyのバージョンを指定して利用できる「RVM」というものがあります。
セキュリティ上別のバージョンを使わないといけないときなどに役に立つのですが、RVMの入れ方がまずかったらしくRedmineが動かなくなっていたのでアンインストールすることに。
……で、アンインストールする時は「rvm implode
」と打てばいいらしいのですが、なんと「rvm seppuku
」というのがあるようです。
か「切腹って……ほ……本当にこれでアンインストールできるのかな……?」
kptech@alice-m-desktop:~/.railsapp/redmine$ rvm seppuku Are you SURE you wish for rvm to implode? This will recursively remove /home/kptech/.rvm and other rvm traces? (anything other than 'yes' will cancel) >
か「えっ(yesと入力してEnter)」
Removing rvm-shipped binaries (rvm-prompt, rvm, rvm-sudo rvm-shell and rvm-auto-ruby) Removing rvm wrappers in /home/kptech/.rvm/bin Hai! Removing /home/kptech/.rvm rm: `/etc/profile.d/rvm.sh' を削除できません: 許可がありません Could not remove '/etc/profile.d/rvm.sh', please try removing it manually. /home/kptech/.rvm has been removed. Note you may need to manually remove /etc/rvmrc and ~/.rvmrc if they exist still. Please check all .bashrc .bash_profile .profile and .zshrc for RVM source lines and delete or comment out if this was a Per-User installation. Also make sure to remove `rvm` group if this was a system installation. Finally it might help to relogin / restart if you want to have fresh environment (like for installing RVM again). kptech@alice-m-desktop:~/.railsapp/redmine$ rvm cat: /home/kptech/.rvm/VERSION: そのようなファイルやディレクトリはありません bash: /home/kptech/.rvm/scripts/base: そのようなファイルやディレクトリはありません bash: /home/kptech/.rvm/scripts/help: そのようなファイルやディレクトリはありません
アンインストール成功。
……ということで面白いアンインストールコマンドの話でした。