Search code examples
dspace

Is there any way to delete all dspace items without deleting the collections and communities structure?


Dspace 5.10v

Is there any way to delete all dspace items without deleting the collections and communities structure?

I have a base of 1.5 million records and I need to clean this data without erasing the collection structure which is quite extensive.


Solution

  • You can use Batch Metadata Editing.config/modules/bulkedit.cfg must have "allowexpunge = true"

    • Export each community csv using the administrator option "Export Metadata"
    • Delete from this csv all columns except "id" and "column".
    • Add one last column named "action" with the value "expunge"
    • Import this csv using command line "[dspace]/bin/dspace metadata-import -f new_file.csv -e [email protected]"

    More info: https://wiki.lyrasis.org/display/DSDOC5x/Batch+Metadata+Editing#BatchMetadataEditing-Performing'actions'onitems