Posts Learn Components Snippets Categories Tags About

Clearing PHP Composer cache

Learn how to clear composer cache when package seem just don't want to update

4 months ago

3 mins read


In this short post, you'll learn how to clear composer cache in your local filesystem which may prevent your packages from being updated.

The command to achieve this is very straightforward, do run the command below:
composer clearcache
For an alias (have dashed)
composer clear-cache
Below is the message that's usually displayed when there's an issue with updating the package.
"The requested package vendor/package could not be found in any version, there may be a typo in the package name"

Now try to re-run the install or update command to update your packages,
composer install && composer update
For an alternative, you can also run the install with the no-cache flag,
composer install --no-cache

Load comments for Clearing PHP Composer cache


PostSrc Code Snippets

Learn new snippets today, level up your Laravel, Alpine JS, Vue JS, Tailwind CSS skills and more.

Learn New Snippets

Authored by

PostSrc poster


Full stack developer mainly focusing on the front end side of the web. The main author of PostSrc and loves writing tutorial and guides online.


PostSrc Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that's right for your project.

View Components