I am trying to update via Composer following what reported in Update core via Composer, but when I do composer update drupal/core --with-dependencies, I get the following output.

Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

I checked /admin/report/updates, and I can see that Drupal 8.5 is available. The content of composer.json is the following.

    "repositories": [
        "type": "composer",
        "url": "https://packages.drupal.org/8"

Why isn't Composer updating core?

  • Welcome to Drupal Answers! In order to giving you an answer, please add the version restrictions of your Drupal core from the composer.json's require section to the question. (Should look like e.g. "drupal/core": "^8.5") - You may as well check out this question/answer first: drupal.stackexchange.com/questions/167922/… Apr 10, 2018 at 22:38

1 Answer 1


If composer update drupal/core --with-dependencies doesn't work, verify the composer.json file contains these lines and remove them. (XX equals anything.)

"replace": {
    "drupal/core": "~8.XX"

In any case, run composer require drupal/core:~8.5.1, even if the composer.json file did not contain those lines.

If that fails, try my last ditch method.

  • Remove the core and vendor folders

    sudo rm -rf core vendor
  • Clear the Composer cache

    composer clearcache
  • Run composer require drupal/core:~8.5.1

Don't forget to make a backup first, if you haven't already.

  • 1
    After running your code, removing core & vendor, clearing composer cache, I ran composer require and got some errors. I followed https://www.drupal.org/project/drupal/issues/2943546 and ran composer update . Everything downloaded, and got things running again thank! Apr 11, 2018 at 16:15
  • My pleasure! And thanks for your comment outlining what other steps you took, it will help others that stumble on this page.
    – 100pic
    Apr 11, 2018 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.