How to delete all credentials & workflows


We are trying to find an easy solution to clean an N8N instance. We need to delete all workflows and credentials.

We cannot find any process to do that (CLI, etc), we can maybe doing it from sqllite, but it’s not the best.

Is there is possibility to do that ? maybe with reinitialize DB ?

Information on your n8n setup

  • **n8n version:0.230.3
  • **Database : SQLite
  • ** n8n EXECUTIONS_PROCESS setting : own
  • **Running n8n via Docker
  • **Operating system:ubuntu 21.04

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

no everything is indicated.

Try a sample workflow like this

Get all your workflows or credentials using the n8n node then delete all returned workflows. Ofcourse it will delete the current excution you can add a sort by date so as to delete this workflow last.
You can replicate the same concept for the credentials


Thanks but if I’m right, “Settings > API” is only available with online version. We are using N8N on premise. How can we generate API key ?

Kind regards

n8n api documentation is available on this Authentication | n8n Docs . Am using it on my selfhosted version.
Its easy to setup and use

The API is available in both versions of n8n

Thanks a lot @Imperol !

Just to avoid confusion by other people reading that in the future. There is no difference regarding the API between the “online version” (n8n cloud) and the self-hosted n8n community version. Both include the API, can be found in the same location, and offer the same functionality.

1 Like

Hi Jan, Imperol,

Thanks so much for your quick answer.

We identify problem, when we activate OAUTH to secure N8N (with N8N_OAUTH2_AUTH_ACTIVE=true and all parameters) the API is not allowed and cannot be used anymore.

Any idea with that conflict configuration or any idea how to manage that…

Thanks a lot

Hey @bensgg,

Where did you see N8N_OAUTH2_AUTH_ACTIVE documented? It is not a config option that I am aware of but it could be something that is no longer supported or used as you appear to be on an older n8n release.

Your version is 0.230.3. Upgrade to the latest version for the updated version. Keep in mind migrating from 0. to 1. might have some breaks. Check the docs before you make the migration/update

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.