{
    "mode": "man",
    "parameter": "bundle-update",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/bundle-update/1/json",
    "generated": "2026-09-04T00:13:53Z",
    "synopsis": "bundle    update    *gems   [--all]   [--group=NAME]   [--source=NAME]   [--local]   [--ruby]\n[--bundler[=VERSION]] [--full-index] [--jobs=JOBS] [--quiet] [--patch|--minor|--major] [--re‐\ndownload] [--strict] [--conservative]",
    "sections": {
        "NAME": {
            "content": "bundle-update - Update your gems to the latest available versions\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "bundle    update    *gems   [--all]   [--group=NAME]   [--source=NAME]   [--local]   [--ruby]\n[--bundler[=VERSION]] [--full-index] [--jobs=JOBS] [--quiet] [--patch|--minor|--major] [--re‐\ndownload] [--strict] [--conservative]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Update the gems specified (all gems, if --all flag is  used),  ignoring  the  previously  in‐\nstalled gems specified in the Gemfile.lock. In general, you should use bundle install(1) bun‐\ndle-install.1.html to install the same exact gems and versions across machines.\n\nYou would use bundle update to explicitly update the version of a gem.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "--all  Update all gems specified in Gemfile.\n\n--group=<name>, -g=[<name>]\nOnly  update the gems in the specified group. For instance, you can update all gems in\nthe development group with bundle update --group development. You can also call bundle\nupdate rails --group test to update the rails gem and all gems in the test group,  for\nexample.\n",
            "subsections": [
                {
                    "name": "--source=<name>",
                    "content": "The  name  of a :git or :path source used in the Gemfile(5). For instance, with a :git\nsource of http://github.com/rails/rails.git, you would  call  bundle  update  --source\nrails\n",
                    "long": "--source",
                    "arg": "<name>"
                },
                {
                    "name": "--local",
                    "content": "Do not attempt to fetch gems remotely and use the gem cache instead.\n\n--ruby Update the locked version of Ruby to the current version of Ruby.\n",
                    "long": "--local"
                },
                {
                    "name": "--bundler",
                    "content": "Update the locked version of bundler to the invoked bundler version.\n",
                    "long": "--bundler"
                },
                {
                    "name": "--full-index",
                    "content": "Fall back to using the single-file index of all gems.\n\n--jobs=[<number>], -j[<number>]\nSpecify  the number of jobs to run in parallel. The default is the number of available\nprocessors.\n",
                    "long": "--full-index"
                },
                {
                    "name": "--retry=[<number>]",
                    "content": "Retry failed network or git requests for number times.\n",
                    "long": "--retry",
                    "arg": "[<number>]"
                },
                {
                    "name": "--quiet",
                    "content": "Only output warnings and errors.\n",
                    "long": "--quiet"
                },
                {
                    "name": "--redownload",
                    "content": "Force downloading every gem.\n",
                    "long": "--redownload"
                },
                {
                    "name": "--patch",
                    "content": "Prefer updating only to next patch version.\n",
                    "long": "--patch"
                },
                {
                    "name": "--minor",
                    "content": "Prefer updating only to next minor version.\n",
                    "long": "--minor"
                },
                {
                    "name": "--major",
                    "content": "Prefer updating to next major version (default).\n",
                    "long": "--major"
                },
                {
                    "name": "--strict",
                    "content": "Do not allow any gem to be updated past latest --patch | --minor | --major.\n",
                    "long": "--strict"
                },
                {
                    "name": "--conservative",
                    "content": "Use bundle install conservative update behavior and do not allow indirect dependencies\nto be updated.\n",
                    "long": "--conservative"
                }
            ]
        },
        "UPDATING ALL GEMS": {
            "content": "If you run bundle update --all, bundler will ignore any previously installed gems and resolve\nall dependencies again based on the latest versions of all gems available in the sources.\n\nConsider the following Gemfile(5):\n\n\n\nsource \"https://rubygems.org\"\n\ngem \"rails\", \"3.0.0.rc\"\ngem \"nokogiri\"\n\n\n\nWhen you run bundle install(1) bundle-install.1.html the first time, bundler will resolve all\nof the dependencies, all the way down, and install what you need:\n\n\n\nFetching gem metadata from https://rubygems.org/.........\nResolving dependencies...\nInstalling builder 2.1.2\nInstalling abstract 1.0.0\nInstalling rack 1.2.8\nUsing bundler 1.7.6\nInstalling rake 10.4.0\nInstalling polyglot 0.3.5\nInstalling mime-types 1.25.1\nInstalling i18n 0.4.2\nInstalling miniportile 0.6.1\nInstalling tzinfo 0.3.42\nInstalling rack-mount 0.6.14\nInstalling rack-test 0.5.7\nInstalling treetop 1.4.15\nInstalling thor 0.14.6\nInstalling activesupport 3.0.0.rc\nInstalling erubis 2.6.6\nInstalling activemodel 3.0.0.rc\nInstalling arel 0.4.0\nInstalling mail 2.2.20\nInstalling activeresource 3.0.0.rc\nInstalling actionpack 3.0.0.rc\nInstalling activerecord 3.0.0.rc\nInstalling actionmailer 3.0.0.rc\nInstalling railties 3.0.0.rc\nInstalling rails 3.0.0.rc\nInstalling nokogiri 1.6.5\n\nBundle complete! 2 Gemfile dependencies, 26 gems total.\nUse `bundle show [gemname]` to see where a bundled gem is installed.\n\n\n\nAs you can see, even though you have two gems in the Gemfile(5), your  application  needs  26\ndifferent  gems  in  order  to run. Bundler remembers the exact versions it installed in Gem‐\nfile.lock. The next time you run bundle install(1) bundle-install.1.html, bundler  skips  the\ndependency resolution and installs the same gems as it installed last time.\n\nAfter  checking  in  the Gemfile.lock into version control and cloning it on another machine,\nrunning bundle install(1) bundle-install.1.html will still install  the  gems  that  you  in‐\nstalled  last  time. You don´t need to worry that a new release of erubis or mail changes the\ngems you use.\n\nHowever, from time to time, you might want to update the gems you are  using  to  the  newest\nversions that still match the gems in your Gemfile(5).\n\nTo  do this, run bundle update --all, which will ignore the Gemfile.lock, and resolve all the\ndependencies again. Keep in mind that this process can result in  a  significantly  different\nset of the 25 gems, based on the requirements of new gems that the gem authors released since\nthe last time you ran bundle update --all.\n",
            "subsections": []
        },
        "UPDATING A LIST OF GEMS": {
            "content": "Sometimes,  you want to update a single gem in the Gemfile(5), and leave the rest of the gems\nthat you specified locked to the versions in the Gemfile.lock.\n\nFor instance, in the scenario above, imagine that nokogiri releases version  1.4.4,  and  you\nwant  to update it without updating Rails and all of its dependencies. To do this, run bundle\nupdate nokogiri.\n\nBundler will update nokogiri and any of its dependencies, but leave alone Rails and  its  de‐\npendencies.\n",
            "subsections": []
        },
        "OVERLAPPING DEPENDENCIES": {
            "content": "Sometimes,  multiple  gems declared in your Gemfile(5) are satisfied by the same second-level\ndependency. For instance, consider the case of thin and rack-perftools-profiler.\n\n\n\nsource \"https://rubygems.org\"\n\ngem \"thin\"\ngem \"rack-perftools-profiler\"\n\n\n\nThe thin gem depends on rack >= 1.0, while rack-perftools-profiler depends on rack ~> 1.0. If\nyou run bundle install, you get:\n\n\n\nFetching source index for https://rubygems.org/\nInstalling daemons (1.1.0)\nInstalling eventmachine (0.12.10) with native extensions\nInstalling open4 (1.0.1)\nInstalling perftools.rb (0.4.7) with native extensions\nInstalling rack (1.2.1)\nInstalling rack-perftoolsprofiler (0.0.2)\nInstalling thin (1.2.7) with native extensions\nUsing bundler (1.0.0.rc.3)\n\n\n\nIn this case, the two gems have their own set of dependencies, but they share rack in common.\nIf you run bundle update thin, bundler will update daemons, eventmachine and rack, which  are\ndependencies   of   thin,   but   not  open4  or  perftools.rb,  which  are  dependencies  of\nrack-perftoolsprofiler. Note that bundle update thin will update rack even though it´s  also\na dependency of rack-perftoolsprofiler.\n\nIn  short, by default, when you update a gem using bundle update, bundler will update all de‐\npendencies of that gem, including those that are also dependencies of another gem.\n\nTo prevent updating indirect dependencies, prior to version 1.14 the only option was the CON‐\nSERVATIVE UPDATING behavior in bundle install(1) bundle-install.1.html:\n\nIn this scenario, updating the thin version manually in the Gemfile(5), and then running bun‐\ndle install(1) bundle-install.1.html will only update daemons and eventmachine, but not rack.\nFor more information, see the CONSERVATIVE UPDATING section of bundle  install(1)  bundle-in‐\nstall.1.html.\n\nStarting with 1.14, specifying the --conservative option will also prevent indirect dependen‐\ncies from being updated.\n",
            "subsections": []
        },
        "PATCH LEVEL OPTIONS": {
            "content": "Version  1.14  introduced  4 patch-level options that will influence how gem versions are re‐\nsolved. One of the following options can be used: --patch, --minor or --major.  --strict  can\nbe added to further influence resolution.\n",
            "subsections": [
                {
                    "name": "--patch",
                    "content": "Prefer updating only to next patch version.\n",
                    "long": "--patch"
                },
                {
                    "name": "--minor",
                    "content": "Prefer updating only to next minor version.\n",
                    "long": "--minor"
                },
                {
                    "name": "--major",
                    "content": "Prefer updating to next major version (default).\n",
                    "long": "--major"
                },
                {
                    "name": "--strict",
                    "content": "Do not allow any gem to be updated past latest --patch | --minor | --major.\n\nWhen  Bundler  is resolving what versions to use to satisfy declared requirements in the Gem‐\nfile or in parent gems, it looks up all available versions, filters  out  any  versions  that\ndon´t  satisfy  the requirement, and then, by default, sorts them from newest to oldest, con‐\nsidering them in that order.\n\nProviding one of the patch level options (e.g. --patch) changes the sort order of the  satis‐\nfying  versions,  causing Bundler to consider the latest --patch or --minor version available\nbefore other versions. Note that versions outside the stated patch level could still  be  re‐\nsolved to if necessary to find a suitable dependency graph.\n\nFor example, if gem ´foo´ is locked at 1.0.2, with no gem requirement defined in the Gemfile,\nand  versions 1.0.3, 1.0.4, 1.1.0, 1.1.1, 2.0.0 all exist, the default order of preference by\ndefault (--major) will be \"2.0.0, 1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2\".\n\nIf the --patch option is used, the order of preference will change to \"1.0.4,  1.0.3,  1.0.2,\n1.1.1, 1.1.0, 2.0.0\".\n\nIf  the  --minor option is used, the order of preference will change to \"1.1.1, 1.1.0, 1.0.4,\n1.0.3, 1.0.2, 2.0.0\".\n\nCombining the --strict option with any of the patch level options will  remove  any  versions\nbeyond the scope of the patch level option, to ensure that no gem is updated that far.\n\nTo  continue  the previous example, if both --patch and --strict options are used, the avail‐\nable versions for resolution would be \"1.0.4, 1.0.3, 1.0.2\".  If  --minor  and  --strict  are\nused, it would be \"1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2\".\n\nGem  requirements  as  defined  in the Gemfile will still be the first determining factor for\nwhat versions are available. If the gem requirement for foo in the Gemfile is ´~> 1.0´,  that\nwill accomplish the same thing as providing the --minor and --strict options.\n",
                    "long": "--strict"
                }
            ]
        },
        "PATCH LEVEL EXAMPLES": {
            "content": "Given the following gem specifications:\n\n\n\nfoo 1.4.3, requires: ~> bar 2.0\nfoo 1.4.4, requires: ~> bar 2.0\nfoo 1.4.5, requires: ~> bar 2.1\nfoo 1.5.0, requires: ~> bar 2.1\nfoo 1.5.1, requires: ~> bar 3.0\nbar with versions 2.0.3, 2.0.4, 2.1.0, 2.1.1, 3.0.0\n\n\n\nGemfile:\n\n\n\ngem ´foo´\n\n\n\nGemfile.lock:\n\n\n\nfoo (1.4.3)\nbar (~> 2.0)\nbar (2.0.3)\n\n\n\nCases:\n\n\n\n#  Command Line                     Result\n------------------------------------------------------------\n1  bundle update --patch            ´foo 1.4.5´, ´bar 2.1.1´\n2  bundle update --patch foo        ´foo 1.4.5´, ´bar 2.1.1´\n3  bundle update --minor            ´foo 1.5.1´, ´bar 3.0.0´\n4  bundle update --minor --strict   ´foo 1.5.0´, ´bar 2.1.1´\n5  bundle update --patch --strict   ´foo 1.4.4´, ´bar 2.0.4´\n\n\n\nIn  case  1,  bar is upgraded to 2.1.1, a minor version increase, because the dependency from\nfoo 1.4.5 required it.\n\nIn case 2, only foo is requested to be unlocked, but bar is also allowed to move because it´s\nnot a declared dependency in the Gemfile.\n\nIn case 3, bar goes up a whole major release, because a minor increase is preferred  now  for\nfoo, and when it goes to 1.5.1, it requires 3.0.0 of bar.\n\nIn  case 4, foo is preferred up to a minor version, but 1.5.1 won´t work because the --strict\nflag removes bar 3.0.0 from consideration since it´s a major increment.\n\nIn case 5, both foo and bar have any minor or major increments removed from consideration be‐\ncause of the --strict flag, so the most they can move is up to 1.4.4 and 2.0.4.\n",
            "subsections": []
        },
        "RECOMMENDED WORKFLOW": {
            "content": "In general, when working with an application managed with bundler, you should use the follow‐\ning workflow:\n\n•   After you create your Gemfile(5) for the first time, run\n\n$ bundle install\n\n•   Check the resulting Gemfile.lock into version control\n\n$ git add Gemfile.lock\n\n•   When checking out this repository on another development machine, run\n\n$ bundle install\n\n•   When checking out this repository on a deployment machine, run\n\n$ bundle install --deployment\n\n•   After changing the Gemfile(5) to reflect a new or update dependency, run\n\n$ bundle install\n\n•   Make sure to check the updated Gemfile.lock into version control\n\n$ git add Gemfile.lock\n\n•   If bundle install(1) bundle-install.1.html reports a conflict, manually update  the  spe‐\ncific gems that you changed in the Gemfile(5)\n\n$ bundle update rails thin\n\n•   If  you  want to update all the gems to the latest possible versions that still match the\ngems listed in the Gemfile(5), run\n\n$ bundle update --all\n\n\n\n\nAugust 2023                            BUNDLE-UPDATE(1)",
            "subsections": []
        }
    },
    "summary": "bundle-update - Update your gems to the latest available versions",
    "flags": [
        {
            "flag": "",
            "long": "--source",
            "arg": "<name>",
            "description": "The name of a :git or :path source used in the Gemfile(5). For instance, with a :git source of http://github.com/rails/rails.git, you would call bundle update --source rails"
        },
        {
            "flag": "",
            "long": "--local",
            "arg": null,
            "description": "Do not attempt to fetch gems remotely and use the gem cache instead. --ruby Update the locked version of Ruby to the current version of Ruby."
        },
        {
            "flag": "",
            "long": "--bundler",
            "arg": null,
            "description": "Update the locked version of bundler to the invoked bundler version."
        },
        {
            "flag": "",
            "long": "--full-index",
            "arg": null,
            "description": "Fall back to using the single-file index of all gems. --jobs=[<number>], -j[<number>] Specify the number of jobs to run in parallel. The default is the number of available processors."
        },
        {
            "flag": "",
            "long": "--retry",
            "arg": "[<number>",
            "description": "Retry failed network or git requests for number times."
        },
        {
            "flag": "",
            "long": "--quiet",
            "arg": null,
            "description": "Only output warnings and errors."
        },
        {
            "flag": "",
            "long": "--redownload",
            "arg": null,
            "description": "Force downloading every gem."
        },
        {
            "flag": "",
            "long": "--patch",
            "arg": null,
            "description": "Prefer updating only to next patch version."
        },
        {
            "flag": "",
            "long": "--minor",
            "arg": null,
            "description": "Prefer updating only to next minor version."
        },
        {
            "flag": "",
            "long": "--major",
            "arg": null,
            "description": "Prefer updating to next major version (default)."
        },
        {
            "flag": "",
            "long": "--strict",
            "arg": null,
            "description": "Do not allow any gem to be updated past latest --patch | --minor | --major."
        },
        {
            "flag": "",
            "long": "--conservative",
            "arg": null,
            "description": "Use bundle install conservative update behavior and do not allow indirect dependencies to be updated."
        }
    ],
    "examples": [],
    "see_also": []
}