Clean Up the Local Composer Cache

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

The Composer client saves caches of packages that were downloaded, as well as metadata responses.

We recommend removing the Composer caches (both packages and metadata responses) before using Artifactory for the first time, this is to ensure that your caches only contain elements that are due to requests from Artifactory and not directly from Package. To clear your Composer cache, run the following command:

Clean the Composer cache

composer clear-cache

composer.lock file

In your project directory already has a composer.lock file that contains different dist URLs (download URLs) than Artifactory, you need to remove it, otherwise, when running the composer install command, the composer client will resolve the dependencies using the composer.lock file URLs