Delete all unassigned articles

Hi folks,

Is there some way to delete all unassigned articles (like maybe from the database somewhere)? I have a lot of them (from deleted issues) and I really don’t want to spend time archiving and deleting them individually.

Thanks.

Hi @mgv42,

You can use tools/deleteSubmissions.php to delete submissions by ID.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alex can specify the process please ?, is from the console ? I as you select files from the console or what the next step ?. thanks

Hi @mimolore,

This is something you’ll need to do from the command line. If you have access to the command line, you can run…

php tools/deleteSubmissions.php 12345

…where 12345 is a submission ID.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi, thank you for response, but the step just its only one by one submission?. Is posible delete all of them in one step?. Thanks

Hi @mimolore,

You can delete as many submissions as you want at once by specifying multiple submission IDs.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec, so many thanks. it´s posible write a command to delete consecutive ID´s, like a [998-1021]?.

This can be done in your shell:

Is there a way to specify that only the unpublished submissions get deleted? We imported a large number of articles from another CMS into OJS and the database is cluttered with empty submissions that I’d like to clear out.

Hi @rcostain,

Not currently; you’d need to specify the IDs of the submissions you want to delete.

Regards,
Alec Smecher
Public Knowledge Project Team

Just pasting the solution for deleting submissions between specific ID’s if I ever come back looking for it…

for i in {INSERTIDHERE..INSERIDHERE}; do php tools/deleteSubmissions.php $i; done

1 Like