If your VPS or DS is running out of space, a common cause is MetaTrader storing large numbers of log files over time. These files record platform activity for troubleshooting and history purposes, but they are not required for normal day-to-day trading.

You can safely delete old MetaTrader log files. When MetaTrader starts again, it will automatically create new empty log files as needed.

When this helps

This cleanup is useful when:

  • your VPS reports low disk space

  • MetaTrader has been running for a long time

  • you use Expert Advisors or scripts that generate many entries

  • you run strategy tests or backtesting, which can create especially large log folders

Step 1: Open the MetaTrader data folder

  1. Open your MT4 or MT5 platform.

  2. Select File from the top-left menu.

  3. Choose Open Data Folder.

  4. A folder window will open showing the MetaTrader data location.

Step 2: Delete the log files

There are three main places where MetaTrader log files are usually stored. In each location below, delete the files inside the folder.

Location

Where to find it

What to do

Main logs

Open the logs folder

Select all files inside and delete them

EA logs

Go back to the main folder, then open MQL4 or MQL5, then open Logs

Select all files inside and delete them

Tester logs

Go back to the main folder, then open tester, then open logs

Select all files inside and delete them

Tester logs are often the biggest files, especially if you have been running backtests.

Important note

Deleting these logs will not remove your trading account, charts, indicators, Expert Advisors, or platform settings. It only removes old recorded activity.

After deleting the files, you should have more free space available immediately. If needed, restart MetaTrader to continue working normally.

Quick summary

  • Open MetaTrader

  • Go to File > Open Data Folder

  • Clear files from logs

  • Clear files from MQL4/Logs or MQL5/Logs

  • Clear files from tester/logs