CLI Reference > Server Administration Commands > si deleteproject
 
si deleteproject
deletes projects from the database repository
Synopsis
si deleteproject [--commit] [--[no]deleteIfInUse] [--dump] [--[no]links] [--mark] [--[no]recurse] [--removeUnreferencedDirectories] [--rollback] [--status] [--[no]targets] [--hostname=server] [--port=number] [--password=password] [--user=name] [(-?|--usage)] [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] [--[no]confirm] [--quiet] [--settingsUI=[gui|default]] [--status=[none|gui|default]] [(-g|--gui)] project1, project2...
Description
si deleteproject deletes configuration management projects and their members from the database. All projects and archives are exported to the file system as a backup if the --dump subcommand is used.
The command works through a multi-phase process called a delete session. The delete session is as follows:
1. Mark starts the delete session. Prepares to delete the specified projects and their members by marking them as new candidates.
2. Dump records the list of items marked for purging from the database repository in the current delete session. If projects are marked, the command creates backups of the projects (and all the members, archives, subprojects, and variants that are referenced by them) into backup tables in the database.
* 
At any phase before Commit, you can enter the Rollback phase to discard the target information, and end the delete session with the database unchanged.
3. Commit deletes all of the delete targets identified in the Mark stage, breaks links to deleted objects, and then ends the delete session.
For more detailed information on performing a delete session, see the Integrity Lifecycle Manager Help Center.
Options
This command takes the universal options available to all si commands, as well as some general options. See the options reference page for descriptions.
--commit
subcommand: Commits the deletion by permanently deleting the marked objects.
--[no]deleteIfInUse
used with the --mark subcommand, and specifies if to delete targets that are still in use. One case when a project or archive is still in use is when an out-of-tree item is referring to it. However, it is beyond the scope of this documentation to provide all possible situations when an archive is still in use.
--dump
subcommand: Dumps the objects marked for deletion in the current delete session. If projects are marked, the command recursively creates backups 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.
* 
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.
--[no]links
used with the --status subcommand, and displays a list of all links that are broken upon commit.
--mark
subcommand: 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 Integrity Lifecycle Manager server only supports one delete session at a time and additional targets cannot be added with a second invocation of the --mark subcommand.
Kept candidates are subprojects or members that are not deleted for one of the following reasons:
The subprojects or members are not located in the directory tree of any of the projects specified out of tree.
You do not have DeleteProject permission for the specified project or its development paths.
You do not have DeleteArchive permission for the members.
You used the --nodeleteIfInUse option, and the projects are referenced by an outside link. The link can be that the projects are shared subprojects in other projects that are not specified for the delete session. Links also include every past or present subproject and member archive of every branch of the project specified (mainline, variant, or dropped variant).
You used the --nodeleteIfInUse option, and the members are referenced by an outside link. The link can be to any revision referenced in another project.
* 
When later restoring deleted projects, the kept candidates do not maintain their linkages with restored projects. For information on restoring deleted projects, see the Integrity Lifecycle Manager Help Center.
--[no]recurse
used with the --mark subcommand, to specify if to recurse into subprojects. The default is to recurse.
--removeUnreferencedDirectories
used with the commit subcommand. Allows the administrator to select or skip the automatic removal of unreferenced directories. If the option is not set, no cleanup step occurs. If the option is set, the cleanup step occurs automatically after running si deleteproject. Depending on the number of unreferenced directories that are found, this cleanup step can take an extended amount of time. By default, --removeUnreferencedDirectories is unset and no cleanup is done for unreferenced directories as part of the si deleteproject command. This option does not apply for other subcommands, such as --dump or --mark.
--rollback
subcommand: Cancels a delete session, leaving the database unchanged. This subcommand can only be used in phases prior to Commit.
--status
subcommand: displays the status of the current delete session.
--[no]targets
used with the --status subcommand, to display all delete targets and kept reasons.
--[no]confirm
specifies if to confirm the delete operation.
project1, project2...
specifies projects for the current delete session.
Diagnostics
See the diagnostics reference page for possible exit status values.
Preferences
Using si setprefs or si viewprefs, you are able to set or view the preference keys for this command.
See Also
Commands: si deletearchive
Miscellaneous: ACL, diagnostics, options, preferences