Administration du serveur > Workflow and SCM Projects > Deleting Projects and Archives From Database > To delete projects from the database using the CLI
  
To delete projects from the database using the CLI
* 
Detailed help on using si deleteproject is available from the CLI using the man command.
From the CLI, use the following command:
si deleteproject [subcommmand] value
where valueis used with the --mark subcommand and specifies projects for the current delete session.
Subcommands for si deleteproject include:
--commit commits the deletion by permanently deleting the marked objects.
--dump dumps the objects marked for deletion in the current delete session. If projects are marked, the command recursively creates back ups of the projects in backup tables in the database (dumping them). However, the subcommand does not export all of the members, subprojects, and variants that are referenced by those projects, only the in-tree objects. The project back-ups can be restored later.
* 
Before using the --dump subcommand, you must create backup tables in the database using the isutil -c cmdbbackupcreate command.
To create, remove, or migrate backup tables, use the following commands:
isutil -c cmdbbackupcreate creates an empty set of backup cm tables in the database (this first performs an implicit runcmdbbackupdestroy operation).
isutil -c cmdbbackupdestroy removes the backup tables from the database without creating new tables.
isutil -c cmdbbackupmigrate migrates the backup tables in the database to the new schema version.
After creating the backup tables, verify that they were created. For example, search for the B_CMPROJECT table in the database.
--mark starts a delete session by marking objects and their dependents as new candidates. The subcommand determines what objects are to be delete targets (projects or archives to be deleted) and what objects are to be kept candidates.
* 
The Windchill RV&S server only supports one delete session at a time and additional targets cannot be added with a second invocation of the --mark subcommand.
When later restoring deleted projects, the kept candidates do not maintain their linkages with restored projects.
--rollback cancels a delete session leaving the database unchanged. This subcommand can only be used in phases prior to Commit.
--status displays the status of the current delete session.
Command options for si deleteproject include:
--[no]deleteIfInUse, used with the --mark subcommand, specifies if to delete targets that are still in use. Something is marked as in use if it refers to a particular project or archive that is out of tree.
--[no]links, used with the --status subcommand, displays a list of all links that are broken upon commit.
--[no]recurse, used with the --mark subcommand, specifies if to recurse into subprojects. The default is to recurse.
--[no]targets, used with the --status subcommand, displays all delete targets and kept reasons.