How to clean table public.binary_data in postgresql

How to clean table public.binary_data in postgresql

Describe the problem/error/question

public.binary_data is to large, I want to clean the table ‘public.binary_data’, But I don’t know what issues there might be with directly clearing the data in the table public.binary_data? Or is there a built-in mechanism in N8N that can handle cleaning it after configuring parameters?
I changed the binary data store config:
N8N_AVAILABLE_BINARY_DATA_MODES = filesystem
N8N_BINARY_DATA_STORAGE_PATH = /home/node/.n8n/binaryData
N8N_DEFAULT_BINARY_DATA_MODE = filesystem

What is the error message (if any)?

Please share your workflow

NULL

Share the output returned by the last node

NULL

Information on your n8n setup

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

@ping2025 You can safely clean up the public.binary_data table in PostgreSQL. Since you’ve already configured n8n to use filesystem mode for storing binary data (N8N_DEFAULT_BINARY_DATA_MODE = filesystem), the database table likely contains old data that n8n no longer uses or references.

Get, Thank you very much!

Glad to help! @ping2025

I’d just add one thing here
make sure you have a backup in case you need to restore anything later.