Thread
#prefect-community
    v

    Volker L

    3 months ago
    Hi. is it possible in prefect 2.0 to delete all deployments at once? Thanks
    Anna Geller

    Anna Geller

    3 months ago
    Why would you want to do this?
    You may do:
    prefect orion database reset -y
    if you want to entirely delete everything and start from scratch
    Otherwise, deleting deployments in such a manner would require first listing all deployments via an API call, then deleting those in a for-loop - all doable but I would be very curious why would you need that - is this for some Terraform style CI use case?
    v

    Volker L

    3 months ago
    Because the deployments failed to run, due to a missing import. I tried to update the deployments after I have fixed my code (added the missing import), but did not work unfortunately.
    Anna Geller

    Anna Geller

    3 months ago
    it might be you only need to update your docker image used by your docker/lubernetes flow runner, or conda/venv in a subprocess flow runner?
    v

    Volker L

    3 months ago
    Furthermore, I deleted the orion db with
    prefect orion database reset -y
    And deleted the
    .prefect
    folder
    Anna Geller

    Anna Geller

    3 months ago
    this doesn't delete the DB, it only resets everything
    v

    Volker L

    3 months ago
    I am using a subprocess flow runner. How can I update my conda env? Simply create a new conda env?
    Anna Geller

    Anna Geller

    3 months ago
    yup, or even make changes to the existing one which makes things even easier
    flurven

    flurven

    3 months ago
    What happens if you just remove the deployment table in the Orion database? Will it be recreated on the next run?
    Anna Geller

    Anna Geller

    3 months ago
    I'm afraid your schema will be broken since the tables have FK relationships between each other - either reset the DB or don't touch it directly, only interact with your database via API/CLI/UI or Orion client - this would be my recommendation