ARTIFACTORY: How to resolve packages when it is removed from the upstream remote repository

AuthorFullName__c
Pruthvi R B
articleNumber
000006008
FirstPublishedDate
2024-01-29T12:53:14Z
lastModifiedDate
2025-07-22

ARTIFACTORY: How to resolve packages when it is removed from the upstream remote repository

In this article, we will learn how to resolve packages when it is removed from the upstream remote repository.

In certain instances, older versions of packages may be removed from the upstream repository to which your remote repository is connected. However, it is essential to maintain access to these older versions for internal projects without disrupting ongoing builds.
This article outlines a professional approach to resolving such scenarios within Artifactory.

Understanding Artifactory's Metadata Handling:

Artifactory efficiently organizes and tracks packages through metadata. The expiration of the "Metadata Retrieval Cache Period" prompts Artifactory to fetch updated metadata files from the upstream repository. If new versions are introduced, querying for a package without specifying the version retrieves the latest version from the upstream.
In cases where a package has been deleted upstream, Artifactory updates the metadata file in the remote repository. It removes references to the deleted package when the "Metadata Retrieval Cache Period" expires. As a consequence, attempting to retrieve that specific artifact results in a "not found" error.

Recommended Approach: Effective Resolution through Local Repositories

To overcome this challenge, If the objective is to maintain access to all artifacts in the cache, irrespective of the upstream repository's state, the recommended approach is to copy these artifacts from the cache to a local repository. Moving the affected packages to a local repository triggers the generation of fresh metadata after deployment. This ensures the successful resolution of the package, mitigating the impact of upstream deletions.

Managing package deletions in upstream repositories is a crucial aspect of maintaining a robust and reliable Artifactory setup. By understanding the intricacies of metadata handling and adopting the recommended approach of utilizing local repositories, developers can ensure seamless access to required artifacts and prevent disruptions in their build processes.