In some situations it is necessary to delete files from a project in order to free up disk space. The files on the file system are not immediately deleted.
Files not being immediately deleted on the file system is by design to provide a means of backing up the repository in the event an inadvertant deletion took place. 7 Days after a file is deleted the record in the SMART_REPOSITORY_LOGICAL_FILE is deleted which then results in the file being deleted from the file system. Mind that this 7 day wait provides a means of recovering the data if an inadvertant deletion took place AND a recent backup of the project's database/schema was taken before the deletion took place.
Hasten deletion of the files from the file repository by logging into the Site Administration, select the project in question, then click the Promote Repository Cleanup, then wait a few hours. This marks the records in the SMART_REPOSITORY_PHYSICAL_FILE for deletion.
Then click on Promote Repository Cleanup a second time and wait. The records marked for deletion in the SMART_REPOSITORY_PHYSICAL_FILE will be deleted along with the file in the file system.
The default “wait” period of seven days before deletion can be adjusted by adding the following Site Configuration parameter…
Parameter Name: REPOSITORY_GC_DELAY_CANDIDATE_TIME
Value: <integer> (measured in days)
Default Value: 7
Possible Values: 0-28
In the case of an critical disk space issue the following can be used however do so with caution...
1) Deactivate the project via the Site Administration
2) Backup the project's file system and project database/schema while the project is inactive.
3) Delete files using the ALM GUI, Test Runs Deletion tool (in QTP)
4) Issue the following query…
delete from SMART_REPOSITORY_PHYSICAL_FILE where SRPF_ID not in (select srlf_physical_id from SMART_REPOSITORY_LOGICAL_FILE)
5) Once the query is complete, right click on the Project>Maintain Project>Realign Repository
This will take the project offline and the file deletions will be immediate will be complete when the Realigh Repository function completes; this may take some time.
6) Activate the project
Mind that this process should be used with caution as we recommend using the process of using Promote Repo Cleanup or by adding the Site Configuration parameter (above)