Training
Module
Plan Agile with GitHub Projects and Azure Boards - Training
Plan Agile with GitHub Projects and Azure Boards
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
If a project becomes obsolete, you can delete it from your organization or collection in Azure DevOps. Likewise, if you're migrating from an on-premises Azure DevOps Server to Azure DevOps Services, it might be necessary to delete the project. The removal of projects can also enhance navigation by restricting it to only those projects that are currently in use.
Caution
Category | Requirements |
---|---|
Permissions | - Member of the Project Collection Administrators group. Organization owners are automatically members of this group. - Delete team project permission set to Allow. For more information, see View project-level permissions. |
Optional | Save project data before deleting a project if you want to access project data without restoring it. |
Category | Requirements |
---|---|
Permissions | Delete team project permission set to Allow. For more information, see View permissions. |
Optional | Save project data, as deleting a project results in irreversible data loss. |
Use the following procedures to save data that users most care about, such as source code, build data, and work items. This procedure is optional and something you might consider before you delete a project.
Source code and custom build templates: Download your files as a zip file. Select for the repository, file, or folder and select Download as Zip. Or, select
Download to download either all of the files in the currently selected folder, or the currently selected file.
This process doesn't save any change history or links to other artifacts. If you use Git, clone your repositories to retain the full project history and all the branches.
Build data: To save logs and data in your drop build folders, see View build results.
Work item tracking data: Create a work item query and open it using Excel. Save the Excel spreadsheet.
This process doesn't save any attachments, change history, or links to other artifacts.
For more information, see our Data Protection Overview.
Use your web browser to perform a soft-delete. After 28 days, projects are permanently deleted if not restored within that time.
Sign in to your organization (https://dev.azure.com/{yourorganization}
).
Select Organization settings.
Select Projects, check one or more projects to delete, and then select Delete.
Confirm deletion by entering the project name, and then select Delete in the popup screen.
Your project is deleted and can be restored up to 28 days afterward. Your deleted project is removed from your projects list.
If your project used SQL Server reporting and you didn't delete external artifacts, you can delete the reports using SQL Server Report Manager. From the project collection page, delete the folder that corresponds to the deleted project.
If you inadvertently delete a project in Azure DevOps, you can restore it within 28 days of its deletion.
Sign in to your organization (https://dev.azure.com/{yourorganization}
).
Select Organization settings.
Select Overview, and then scroll down to "recently deleted projects."
Highlight the project you want to restore, and then select Restore.
Sign in to your instance (http://{ServerName:8080/tfs/}/{CollectionName}
).
Choose Admin settings.
Select Projects, and then scroll down to Recently deleted projects.
Highlight the project you want to restore, and then select Restore.
Note
The UI doesn't support restoring a team project for Azure DevOps Server 2019. Use the following REST API or PowerShell methods to restore a deleted team project. For more information, see Projects-Update REST API.
Warning
To restore a project with a name that's already taken, you must rename the project before you can restore it. To rename the project, enter the following text in the request body: "name":"new name"
Open a browser window and enter a URL that uses the following form:
'http://ServerName:8080/tfs/DefaultCollection/ProjectName'
For example, to connect to the server named FabrikamPrime, enter: 'http://FabrikamPrime:8080/tfs/'.
The default Port is 8080. Specify the port number and directory for your server if defaults aren't used.
Get a list of deleted projects using the following request:
GET http://ServerName:8080/tfs/DefaultCollection/_apis/projects?stateFilter=
deleted&api-version=5.0-preview.3
Restore a deleted project using the following request:
PATCH http://ServerName:8080/tfs/DefaultCollection/_apis/projects/{projectId}?
api-version=5.0-preview.3
Request body
{
"state" : "wellFormed"
}
Execute the following PowerShell script to get a list of deleted projects and make sure to update $collectionUrl
.
$collectionUrl = "https://localhost/defaultcollection"
(irm -Uri "$collectionUrl/_apis/projects?stateFilter=
deleted&api-version=5.0-preview.3" -UseDefaultCredentials).value
Use the following script to restore a project. Be sure to update $collectionUrl
and $projectName
.
$collectionUrl = "https://localhost/defaultcollection"
$projectName = 'Project1'
$project = (irm -Uri "$collectionUrl/_apis/projects?stateFilter=
deleted&api-version=5.0-preview.3" -UseDefaultCredentials).value
| where {$_.name -eq $projectName}
irm -Uri ($project.url + "?api-version=5.0-preview.3")
-UseDefaultCredentials -Method PATCH -Body '{"state":"wellFormed"}'
-ContentType 'application/json'
Your project and associated data are restored.
See the following frequently asked questions about deleting projects in Azure DevOps.
A: Work items get deleted within 24 hours after your project is deleted.
A: Wait 28 days before the project is permanently deleted.
Training
Module
Plan Agile with GitHub Projects and Azure Boards - Training
Plan Agile with GitHub Projects and Azure Boards