To take away old Ruby versions, simply rm -rf the directory of the model you need to take away. You can discover the listing of a selected Ruby model with the rbenv prefix command, e.g. rbenv prefix 1.8.7-p357. As time goes on, Ruby versions you put in will accumulate in your~/.rbenv/variations directory.
Alternatively to the install command, you possibly can obtain and compile Ruby manually as a subdirectory of ~/.rbenv/versions/. An entry in that listing may also be a symlink to a Ruby version installed elsewhere on the filesystem. rbenv doesn’t care; it’ll simply treat any entry in the versions/ listing as a separate Ruby model. Through a process referred to as rehashing, rbenv maintains shims in that listing to match every Ruby command across every installed model of Ruby–irb, gem, rake, rails, ruby, and so forth. Sets a neighborhood software-specific Ruby model by writing the model name to a .ruby-model file within the present listing. This version overrides the global version, and may be overridden itself by setting the RBENV_VERSION setting variable or with the rbenv shellcommand.
Also see rbenv shellRBENV_ROOT~/.rbenvDefines the listing underneath which Ruby versions and shims reside. Sets a shell-particular Ruby version by setting the RBENV_VERSIONenvironment variable in your shell.
Install ruby-construct, which offers therbenv set up command that simplifies the method ofinstalling new Ruby variations. Installing rbenv contains ruby-build, so now you’re prepared toinstall some Ruby versions usingrbenv set up. You can modify this file using the rbenv international command. If the worldwide version file just isn’t present, rbenv assumes you want to use the “system” Ruby–i.e. whatever version would be run if rbenv weren’t in your path.