---
title: "deleteProjects"
slug: "api/project/operations/deleteprojects"
sidebar:
  order: 589
---

<a id="ref-ff550ab1c868"></a>
<a id="ref-7dee22c829c1"></a>
<a id="ref-bce9e6a71d22"></a>

## Synopsis

```text
string[] deleteProjects(
    string sessionId,
    string[] uris,
    DeleteProjectsOptions options
)
```

See also: [DeleteProjectsOptions](/pCon/configuratorOnline/specs/api/project/types/deleteprojectsoptions#ref-393067f76ed7)

The `deleteProjects` operation takes a set of project (version) URIs and options. The URIs must be valid URIs with scheme `pst`. They may or may not contain a version parameter. If the version parameter is present the URI references that particular version (unless option `ignoreVersionNumbers` is set to true, in which case all version numbers in URIs are ignored).

If the set of URIs contains an URI without a version parameter, then all URIs referencing a particular version of the same project are ignored.

If the set of URIs contains an URI without a version parameter, or contains URIs for all versions of the same project, the whole project is deleted.

Deleting a project or project version deletes all database records and all associated OBK files.

The operation behaves atomically. If it fails with an exception than no projects or project versions have been deleted.

 The following options are supported:

- `ignoreVersionNumbers` (default: `false`) All version numbers in URIs passed to the operation are ignored. Multiple URIs for the same project but with different version numbers do not cause an error.

- `failIfNonExistent` (default: `true`) Normally, the operation fails if one of the specified projects or project versions does not exist. If this option is set to false then  requests to delete non-existent projects and project versions are silently ignored.

- `failIfPermissionDenied` (default: `true`) Normally, the operation fails if the user authenticated for the current session does not have permission to delete one of the specified projects or project versions. If this option is set to false then these projects or project versions are not deleted, but projects and project versions the user has permission to delete are still deleted.

- `failIfNotLockable` (default: `true`) Normally, the operation fails if one of the projects to delete, or one of the projects whose version is to be deleted, is currently ocked. If this option is set to false then these projects or project versions are not deleted, but projects that are not locked, and project versions whose project is not locked, are still deleted.

- `ignoreLocks` (default: `false`)  If this option is set to true then projects and project versions are deleted even if they are currently locked.
