Home / Tutorials / Clearing PHP Composer cache
Clearing PHP Composer cache cover

Clearing PHP Composer cache

3 mins


3 years ago



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
notion avatar

Ahmad Aziz

Week-end developer currently experimenting with web, mobile, and all things programming.

Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Related Tutorials

Code Snippets

Collection of Laravel, AlpineJS, VueJS, Tailwind CSS, Flutter snippets and more. New snippets added every day.
View Snippets

Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that's right for your web projects
View Components

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this