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


A few things to try if composer update drupal/core --with-dependencies doesn't work

If you're composer.json contains these lines, remove them (where XX equals anything)

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

Then run composer require drupal/core:~8.5.1 (even if your composer.json did not contain the above lines)

If that fails, try my last ditch method:

Remove the core & vendor folder (we will then re-add)

sudo rm -rf core vendor

Clear Composer cache

composer clearcache

Then again

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, privacy policy and cookie policy

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