> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/managing-portfolios/editing-portfolios.md).

# Editing portfolios

Change the projects and child portfolios of a SonarQube Cloud portfolio, rename, move, or delete child portfolios, or delete a portfolio.

This feature is only available in the [Enterprise plan](https://www.sonarsource.com/plans-and-pricing/).

## Editing a portfolio <a href="#editing-portfolio" id="editing-portfolio"></a>

With the **Edit** permission on a portfolio, you can add and remove projects from it. Note that you do not add a project, but a long-lived branch of a project. In each project selection, you can only add a single branch per project.

You edit a portfolio on its **Portfolio definition** page. A child portfolio has no **Administration** menu of its own, so you edit it through the **Portfolio definition** page of its root portfolio. See [#managing-child-portfolios](#managing-child-portfolios "mention").

The **Portfolio definition** page shows the name and description of the portfolio, and a summary of its contents with the number of projects it contains. If the hierarchy contains duplicate project branches, the page also shows a warning. See [Creating portfolios](/sonarqube-cloud/managing-portfolios/creating-portfolios.md#duplicate-project-branches).

### Changing the name and description <a href="#changing-name-and-description" id="changing-name-and-description"></a>

1. Retrieve your portfolio. See [Viewing portfolios](/sonarqube-cloud/managing-portfolios/viewing-portfolios.md#retrieving-portfolio).
2. Go to *your portfolio* > **Administration** > **Portfolio definition**.
3. Select **Edit info**.
4. In the **Edit the name and description** dialog, update the name and description, then select **Save**.

You can also select **Edit info** in the **About this portfolio** section of the portfolio's Overview page.

To rename a child portfolio, see [#managing-child-portfolios](#managing-child-portfolios "mention").

### Changing the portfolio contents <a href="#changing-portfolio-contents" id="changing-portfolio-contents"></a>

1. Retrieve your portfolio. See [Viewing portfolios](/sonarqube-cloud/managing-portfolios/viewing-portfolios.md#retrieving-portfolio).
2. Go to *your portfolio* > **Administration** > **Portfolio definition**.
3. Select **Manage portfolio contents**. The **Edit portfolio contents** page opens.

<figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-10c566960bdd9c14de8064281570410e9b1244ab%2Fsonarqube-cloud-portfolio-definition-contents.png?alt=media" alt="Portfolio definition page of a root portfolio with the portfolio name, the Edit info button, and the Manage portfolio contents button."><figcaption></figcaption></figure>

4. Make your changes:\
   a. To change the projects of a portfolio, select **Manage project selection** in its **Add projects directly** section. If the portfolio has child portfolios, first select the portfolio in the **Portfolio tree**. To remove the selection, select **Clear selection**. See [Creating portfolios](/sonarqube-cloud/managing-portfolios/creating-portfolios.md#adding-projects-directly).\
   b. To add a child portfolio, select **Create child portfolio** on the portfolio that you want to be the parent. See [Creating portfolios](/sonarqube-cloud/managing-portfolios/creating-portfolios.md#creating-child-portfolios).\
   c. To rename, move, or delete a child portfolio, see [#managing-child-portfolios](#managing-child-portfolios "mention").
5. Select **Save**.

### Managing child portfolios <a href="#managing-child-portfolios" id="managing-child-portfolios"></a>

You manage child portfolios on the **Edit portfolio contents** page of the root portfolio, or in the **Add projects** step of the creation wizard. Select the child portfolio in the **Portfolio tree**, then open its action menu:

* **Edit name and description**: Change the name and description of the child portfolio.
* **Move**: Select a new parent for the child portfolio. Its child portfolios and projects move with it. You can move a child portfolio anywhere in the same hierarchy, except under one of its own descendants.
* **Delete**: Delete the child portfolio.

<figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-e66c344788f5fc2a9112ef2d4e78eb388de174b9%2Fsonarqube-cloud-portfolios-edit-child.png?alt=media" alt="Edit portfolio contents page with a child portfolio selected in the Portfolio tree and its action menu open, showing Move and Delete."><figcaption></figcaption></figure>

{% hint style="warning" %}
Deleting a child portfolio also deletes any child portfolios nested under it and their portfolio historical data. The projects themselves are not deleted.

On the **Edit portfolio contents** page, moves and deletions take effect only when you select **Save**. If you select **Cancel** or leave the page without saving, your changes are discarded.
{% endhint %}

## Deleting a portfolio <a href="#deleting-portfolio" id="deleting-portfolio"></a>

With the Edit permission on a portfolio, you can remove it from the system.

1. Retrieve your portfolio. See [Viewing portfolios](/sonarqube-cloud/managing-portfolios/viewing-portfolios.md#retrieving-portfolio).
2. Go to *your portfolio* > **Administration** > **Delete portfolio**.

{% hint style="warning" %}
Deleting a root portfolio also deletes all its child portfolios and their portfolio historical data. The projects themselves are not deleted.
{% endhint %}

To delete only a child portfolio, see [#managing-child-portfolios](#managing-child-portfolios "mention").

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Managing portfolios](/sonarqube-cloud/managing-portfolios.md)
* [Creating portfolios](/sonarqube-cloud/managing-portfolios/creating-portfolios.md)
* [Viewing portfolios](/sonarqube-cloud/managing-portfolios/viewing-portfolios.md)
* [Administering portfolios](/sonarqube-cloud/managing-portfolios/administering-portfolios.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-cloud/managing-portfolios/editing-portfolios.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
