Redmine: remove archived projects
Question: I would like to remove all archived projects on my redmine installation. Doing
so from my browser works, but I have 400 of them...

I had the idea to script it, but the [redmine REST
api](http://www.redmine.org/projects/redmine/wiki/Rest_api_with_python)
doesn't seem to expose the deletion of archived projects... And there is no
"Remove all" feature from the administration panel.

Did any of you already had to deal with those kind of things?


Answer: try python-redmine library:

    
    
    from redmine import Redmine
    
    redmine = Redmine('http:///', username='', password='')
    projects = redmine.project.all()
    for project in projects:
        print project.status, project.id
    for project in projects:
        if project.status == 5:
            redmine.project.delete(project.id)
    

<https://media.readthedocs.org/pdf/python-redmine/latest/python-redmine.pdf>

