# Uninstall Specific Version Of A Ruby Gem

I have two versions of `bundler` installed on my machine—`2.2.4` and `2.2.10`. When I check the version of bundler, I see it references the latest one.

```bash
$ bundle --version
Bundler version 2.2.10
```

I want to get rid of `2.2.10` so that I can use `2.2.4` instead. This can be done by uninstalling that specific version of `bundler`.

To do this, specify the `-v` flag when running `gem uninstall`.

```bash
$ gem uninstall bundler -v 2.2.10
Successfully uninstalled bundler-2.2.10
$ bundle --version
Bundler version 2.2.4
```

Alternatively, if you want to use a different version of a gem without uninstalling the primary version, you can [specify the version after the gem name when calling it](/til/programmy/ruby/run-an-older-version-of-bundler.md).

[source](https://stackoverflow.com/questions/23887726/rails-uninstall-specific-version-of-a-library-using-gem)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ploegert.gitbook.io/til/programmy/ruby/uninstall-specific-version-of-a-ruby-gem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
