JetBrains Space Help

Administrate Package Repositories

Users with the System Admin role can perform global administration of repositories using the Administration | Package Repositories page. The list of repositories available to you on this page depends on your user account permissions.

Package Repositories page

On the Administration | Package Repositories page:

  • Active shows the list of the repositories that are attached to a project(s). After you create a repository in a project, it becomes attached to this project. The attached repository can be distinguished by its alias: $project_name/$repository_name. You can attach a repository to multiple projects. In this case, the repository will have multiple aliases.

  • Detached shows the list of the repositories (repository aliases) that are no longer attached to a project.

    How the repository becomes detached:

    What happens next:

    • If the detached repository has no more aliases (not attached to other projects), after one week, it is automatically deleted. During this week, the detached repository is still available at its URL.

    • If the repository has other aliases (it is attached to other projects), it will not be deleted until these other aliases exist. During this time, the detached repository is still available at its URL.

    • In both cases, the repository will be deleted if someone creates a repository with the same name in the same project.

  • All shows all repositories in the organization.

Attach a repository to a project or multiple projects

  1. In Administration, open the Package Repositories page.

  2. Find the required repository and in the repository menu, choose Attach to project.

    Attach a repo to a project
  3. In the opened window, select the project to attach to and specify the repository name. Note that the repository is allowed to have different names in different projects.

  4. After this, a new alias will be assigned to the repository, and the repository will become available on the project's Packages page.

Detach repositories from projects

  1. In Administration, open the Package Repositories page.

  2. Find the required repository alias (the alias associated with the project from which you want to detach the repository) and click the Detach alias button Detach alias next to the alias.

    Detach a repo from a project
  3. After this, the detached repository will disappear from the project's Packages page but it will be available at its old URL within one week. After this week, if the repository has no more aliases (is not attached to at least one project), it will be deleted permanently. Otherwise, if the repository has other aliases, it will be available at its URL until these other aliases exist.

Delete repositories

  1. Navigate to the project where you want to delete a repository.

  2. On the project sidebar, choose Packages.

  3. In the repository menu, choose Delete.

    Delete a repository
  4. After this, the repository is not deleted permanently. Instead, it becomes detached: it will disappear from the project's Packages page but it will be available at its old URL within one week. After this week, it will be deleted permanently.

    Note that if someone deletes the project this repository belongs to, the repository is deleted immediately and permanently.

Configure auto-deletion of packages

With packages being uploaded, a repository grows over time. To release storage space and improve repository performance, you can configure auto-deletion of old and no-longer-needed packages. This is done with a set of conditions called retention policies.

Note that 'retention policies' are not 'cleanup rules'. While the latter implies that a certain condition must be met in order to delete a package, 'retention policies' are conditions that prevent packages from deletion. If at least one condition is satisfied, the package will not be auto-deleted.

To configure auto-deletion of packages in a repository

  1. Open the Packages page of the required project.

  2. Find the required repository and in the repository menu, choose Settings.

    Repository settings
  3. Open the Retention Policies tab and switch on Automatic Repository Cleanup.

  4. Specify retention policies:

    • Keep package versions for a set time frame after the most recent download: The package will not be deleted if it was downloaded at least once in the last specified number of Days.

    • Keep the specified number of package versions: If the specified number of package versions is exceeded, the oldest package will be deleted. For example, you have 5 package versions from 1.0.1 to 1.0.5 and set the number of Versions to 5. Once the 1.0.6 version is uploaded, the 1.0.1 will be no longer protected by this policy.

    • Keep package versions with at least one download.

    • Keep the pinned package versions: This policy is not shown on the page but it is always turned on. Learn how to pin a package next in this section.

  5. Click Save.

  6. If you want Packages to perform the cleanup immediately, click Clean up now. Otherwise, Packages will perform the cleanup once a day.

To pin a package (exclude it from auto-deletion)

  1. Find the required package.

  2. Choose Pin in the package menu.

    Pin Package

    Pinned packages are marked with the Pinned tag.

Last modified: 22 September 2023