In this example, We have shared how to uninstall old versions of Ruby gems. Way to clean out any old versions of gems. gem cleanup uses system commands. Installed gems are just directories in the filesystem.
# remove all old versions of the gem
gem cleanup rjb
# choose which ones you want to remove
gem uninstall rjb
# remove version 1.1.9 only
gem uninstall rjb --version 1.1.9
# remove all versions less than 1.3.4
gem uninstall rjb --version '<1.3.4'
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.