How to Completely Uninstall MetaTrader 5 and Perform a Clean Reinstall
Here, you’ll find a complete step-by-step guide to uninstalling and reinstalling MetaTrader 5 on Windows and macOS.
Please select your operating system below and follow the instructions carefully to completely remove MetaTrader 5 and perform a clean, fresh installation on your system.
Uninstall and Reinstall on Windows
Uninstalling MetaTrader 5 from Windows does not always mean that every file associated with the platform has been removed.
MetaTrader 5 stores different types of data in multiple locations on your computer. These may include your Expert Advisors, custom indicators, scripts, account information, platform settings, chart profiles, templates, price history, logs, Strategy Tester data, presets, and cached files.
As a result, simply uninstalling MetaTrader 5 through Windows may leave some of this data behind. If you later reinstall the platform, parts of your previous environment may still be available.
If you want to completely remove MetaTrader 5 and reinstall it as if it had never been installed on your computer before, follow the steps below carefully.
Important: This process is intended for Windows. It can permanently delete your MetaTrader 5 data. Back up anything you may need before proceeding.
What Does a Complete MetaTrader 5 Removal Delete?
A full clean removal can delete locally stored data such as:
- Expert Advisors (EAs)
- Custom indicators
- Scripts
- MQL5 source and compiled files
- EA presets and input parameters
- Chart templates
- Chart profiles
- Platform configuration
- Locally stored account information
- Price history and cached market data
- MetaTrader and Expert Advisor logs
- Strategy Tester data and cache
- Downloaded platform update files
MetaTrader 5 normally separates its program files from its modifiable user data. The executable platform files are generally stored in the installation directory, while user-specific data is stored separately in the Windows user profile.
Therefore, removing only the installation directory is not enough for a truly clean reinstall.
Step 1: Back Up Important MetaTrader 5 Files
Before deleting anything, decide whether there is information from your current installation that you may need later.
For example, you may want to back up:
- Custom Expert Advisors
- Purchased or downloaded EAs
- Custom indicators
- Scripts
- Source code
- .mq5 files
- .ex5 files
- EA preset .set files
- Templates
- Profiles
- Custom libraries
- Files generated or used by an EA
One of the safest ways to locate the active MetaTrader data directory is:
MetaTrader 5 → File → Open Data Folder
MetaTrader provides this command specifically to open the data directory associated with the current platform instance.
Your algorithmic trading files are primarily located inside:
MQL5
For example:
MQL5\Experts
MQL5\Indicators
MQL5\Scripts
MQL5\Presets
MQL5\Libraries
MQL5\Files
The Experts directory contains Expert Advisors, while Indicators, Scripts, Presets, and other directories contain their corresponding MQL5 resources.
Copy anything important to another location before continuing.
If you want a completely fresh installation and do not need anything from the existing MetaTrader environment, you can skip the backup.
Step 2: Completely Close MetaTrader 5 and MetaEditor
Before uninstalling MetaTrader, make sure all related applications and processes are closed.
Close:
- MetaTrader 5
- MetaEditor
- Strategy Tester-related windows
- Any other MetaTrader instance associated with the installation you are removing
Then open Windows Task Manager:
Ctrl + Shift + Esc
Check the running processes for MetaTrader-related processes such as:
terminal64.exe
terminal.exe
metaeditor64.exe
metaeditor.exe
If one is still running, select it and choose:
End task
This prevents Windows from keeping files locked while you are trying to remove them.
Step 3: Uninstall MetaTrader 5 from Windows
Windows Settings → Apps → Installed apps
Find your MetaTrader installation.
Depending on where you obtained MetaTrader, its name may be:
MetaTrader 5
or it may contain your broker’s name.
Click the menu next to the application and select:
Uninstall
Complete the uninstall process.
Do not reinstall MetaTrader yet. We still need to remove the remaining data.
Step 4: Remove the MetaTrader 5 Data Folder
This is one of the most important steps.
MetaTrader 5 normally stores modifiable platform data separately from the application itself.
On modern versions of Windows, the standard structure is:
C:\Users\YOUR_USERNAME\AppData\Roaming\MetaQuotes\Terminal\INSTANCE_ID\
The INSTANCE_ID is a unique identifier associated with a particular MetaTrader installation path.
This directory can contain important remnants of your previous environment, including configuration files, databases, price history, logs, profiles, MQL5 applications, templates, and Strategy Tester
How to access it
Press:
Win + R
Enter:
%APPDATA%
and press Enter.
Windows should open:
C:\Users\YOUR_USERNAME\AppData\Roaming
Find:
MetaQuotes
Inside it, you will normally find directories related to MetaTrader.
If MetaTrader 5 is the only MetaTrader installation you use
If you have no other MetaTrader 4 or MetaTrader 5 installation whose data you need to preserve, you can remove the relevant MetaQuotes data as part of the clean reset.
If you have multiple MetaTrader installations
Be careful.
Do not blindly delete the entire MetaQuotes directory if another MT4/MT5 installation contains important EAs, settings, profiles, history, or other data.
MetaTrader can maintain separate data directories for different platform installations.
A useful way to identify which data directory belongs to which installation is the:
origin.txt
file located in the platform’s data directory.
According to MetaTrader’s documentation, this file contains the path of the platform installation associated with that particular data directory.
This allows you to identify and remove only the instance you actually want to reset.
Step 5: Check the MetaTrader Installation Folder
Now check whether the application installation directory remains after uninstalling.
A common location is:
C:\Program Files\MetaTrader 5
Broker-specific versions may instead use a directory such as:
C:\Program Files\Broker Name MetaTrader 5
MetaTrader’s read-only application files, including its executable files, are normally stored in the installation directory under Program Files.
If the folder still exists after uninstalling and you have confirmed that it belongs to the MetaTrader installation you want to remove, delete it.
Also check:
C:\Program Files (x86)\
Some installations or related components may have been installed there.
Search for folders containing:
MetaTrader
MetaQuotes
or your broker’s name.
Only delete folders that you have confirmed belong to the installation you are removing.
Step 6: Check AppData for Remaining Files
Press:
Win + R
and enter:
%LOCALAPPDATA%
Check for folders clearly associated with MetaTrader, MetaQuotes, or the broker-specific installation you removed.
If you find one, verify that it belongs to the old MetaTrader installation before deleting it.
The main MetaTrader user-data location on modern Windows is normally under AppData\Roaming, so you should not assume that every MetaTrader installation will necessarily have important files under LocalAppData.
Step 7: Remove Downloaded MetaTrader Update Files
MetaTrader 5 also maintains files used by its automatic update system.
The default update download directory is:
C:\Users\YOUR_USERNAME\AppData\Roaming\MetaQuotes\WebInstall
MetaTrader uses this directory to store downloaded platform updates. citeturn0search8
If you are performing a complete MetaTrader cleanup and no other MetaTrader installation requires these files, you can remove this directory as well.
If you already removed the entire relevant MetaQuotes directory in the previous steps, WebInstall may already be gone.
Step 8: Consider Portable Installations
There is one important exception to the standard folder structure.
MetaTrader can operate in Portable Mode.
When the platform is started with the /portable option, its data can be stored inside the installation directory rather than the normal Windows user-data directory.
For example, a shortcut or command may launch MetaTrader using something similar to:
“C:\SomeFolder\MetaTrader 5\terminal64.exe” /portable
If you previously used MetaTrader in Portable Mode, make sure you also remove the complete portable installation directory after backing up anything important.
Otherwise, old EAs, configuration files, profiles, history, and other data may remain there.
Step 9: Empty the Recycle Bin
After deleting all confirmed MetaTrader-related directories, empty the Windows Recycle Bin.
This is not required for MetaTrader itself to consider the files deleted, but it completes the cleanup and permanently removes the deleted local files from the Recycle Bin.
Step 10: Restart Windows
Restart your computer before reinstalling MetaTrader 5.
A restart helps ensure that:
- Old MetaTrader processes are no longer running
- Locked files are released
- The previous MetaTrader environment is no longer active
After Windows starts again, do not immediately install MetaTrader.
First perform one final check.
Step 11: Perform a Final Check Before Reinstalling
Check the main locations again.
MetaTrader user data
C:\Users\YOUR_USERNAME\AppData\Roaming\MetaQuotes
Standard installation directories
C:\Program Files\MetaTrader 5
and:
C:\Program Files (x86)\MetaTrader 5
For broker-specific MetaTrader installations, also check for folders containing the broker’s name.
The goal is not necessarily to remove every MetaQuotes folder from the computer. The goal is to make sure the files belonging to the MetaTrader instance you are resetting are gone.
This distinction is particularly important if you use multiple MetaTrader terminals.
Step 12: Reinstall MetaTrader 5
You can now install MetaTrader 5 again.
Download the installer from your broker or another trusted source and perform a normal installation.
When the new platform starts, MetaTrader should create the required data directories for the new installation.
At this point, you should have a fresh MetaTrader environment without the previous installation’s locally stored:
- Expert Advisors
- Custom indicators
- Templates
- Profiles
- Presets
- Configuration
- Cached price history
- Tester data
- Local logs
You can then log into your trading account and reinstall only the tools you actually need.
How to Verify That MetaTrader 5 Was Installed Cleanly
After installing the new version, open:
MetaTrader 5 → File → Open Data Folder
Then inspect the new data directory.
You can check:
MQL5\Experts
MQL5\Indicators
MQL5\Scripts
MQL5\Presets
Profiles
Templates
Tester
A new installation should not contain your old custom EAs, indicators, presets, or profiles unless you have manually restored them or MetaTrader has subsequently downloaded/synchronized something.
MetaTrader’s documentation confirms that these directories contain the platform’s EAs, indicators, scripts, presets, profiles, templates, logs, databases, and testing data.
Clean Reinstall Checklist
Before installing MetaTrader 5 again, make sure you have completed the following:
- Backed up any EAs, indicators, presets, templates, or files you want to keep
- Closed MetaTrader 5 and MetaEditor
- Checked Task Manager for remaining MetaTrader processes
- Uninstalled MetaTrader 5 from Windows
- Removed the correct MetaTrader data directory from AppData\Roaming
- Checked the old installation directory in Program Files
- Checked Program Files (x86) where applicable
- Checked for relevant leftover files in LocalAppData
- Removed MetaQuotes\WebInstall if appropriate
- Checked for a Portable Mode installation if you previously used one
- Emptied the Recycle Bin
- Restarted Windows
- Verified that the old MetaTrader instance’s folders are gone
- Installed a fresh copy of MetaTrader 5
Important Note for Users With Multiple MetaTrader Installations
Many traders have more than one MetaTrader terminal installed—for example, terminals from different brokers or separate installations used for manual trading, Expert Advisors, testing, or different accounts.
If this applies to you, do not delete every MetaQuotes folder without first identifying which data directory belongs to the MetaTrader installation you want to remove.
Each MetaTrader installation can have its own data directory, and the origin.txt file can help identify the installation path associated with that directory.
Deleting the wrong directory could remove Expert Advisors, indicators, settings, history, and other data belonging to another MetaTrader installation.
Conclusion
A normal MetaTrader 5 uninstall removes the application, but a true clean reinstall requires you to consider both the program installation directory and the separate platform data directory.
This is particularly important when troubleshooting MetaTrader, testing an Expert Advisor from a completely fresh environment, resolving corrupted settings or cached data, or preparing the platform as if it were being used for the first time.
By removing the old MetaTrader instance, its corresponding data directory, remaining installation files, cached update files where appropriate, and then restarting Windows before reinstalling, you can create a substantially cleaner environment for your new MetaTrader 5 installation.
For additional technical information about MetaTrader’s file structure and data directories, refer to the official MetaTrader 5 documentation:
Uninstall and Reinstall on MacOS
Removing MetaTrader 5 from macOS by simply dragging the application to the Trash does not always remove every file associated with the platform.
MetaTrader 5 may store additional data outside the main application itself, including platform settings, Expert Advisors, indicators, scripts, templates, profiles, price history, logs, cache files, and Strategy Tester data.
As a result, if you remove only the application and then reinstall it, some parts of the previous MetaTrader environment may still remain.
If your goal is to completely remove MetaTrader 5 from your Mac and reinstall it in an environment that is as close as possible to a first-time installation, follow the steps below carefully.
Important: This process may permanently delete your MetaTrader 5 data, including Expert Advisors, indicators, presets, templates, history, and settings. Back up anything important before proceeding.
What Can a Complete MetaTrader 5 Removal Delete?
A full clean uninstall may remove locally stored data such as:
- Expert Advisors
- Custom indicators
- Scripts
- MQL5 files
- .mq5 source files
- .ex5 compiled files
- EA presets
- .set files
- Chart templates
- MetaTrader profiles
- Platform settings
- Locally stored account information
- Price history
- Market cache
- MetaTrader logs
- Expert Advisor logs
- Strategy Tester data
- Temporary files and cache
For this reason, it is important to decide whether you need to keep any part of your existing MetaTrader installation before beginning the removal process.
Step 1: Back Up Important MetaTrader 5 Data
If you have Expert Advisors, indicators, presets, templates, or other files that you may need later, create a backup before removing the platform.
One of the best ways to locate the current MetaTrader data directory is to open MetaTrader 5 before uninstalling it and go to:
File → Open Data Folder
This opens the data directory associated with that specific MetaTrader installation.
A large portion of your custom trading files will be located inside the:
MQL5
folder.
For example:
MQL5/Experts
MQL5/Indicators
MQL5/Scripts
MQL5/Presets
MQL5/Libraries
MQL5/Files
Copy any important files to another location, such as your Documents folder, an external drive, or secure cloud storage.
If you do not need anything from the previous installation and want a completely fresh environment, you can proceed without creating a backup.
Step 2: Completely Close MetaTrader 5
Before removing the application, make sure MetaTrader 5 and all related processes are closed.
First, quit MetaTrader normally.
You can use:
MetaTrader 5 → Quit MetaTrader 5
or press:
Command + Q
If MetaEditor or any related MetaTrader tools are open, close them as well.
Step 3: Check Activity Monitor
To make sure no MetaTrader-related process is still running in the background, open Activity Monitor.
Press:
Command + Space
and search for:
Activity Monitor
Open it and search for processes containing terms such as:
MetaTrader
MetaEditor
terminal
wine
The presence of Wine-related processes depends on the MetaTrader version and how it was installed.
Do not automatically terminate every Wine process, because other applications on your Mac may also use Wine.
If a process clearly belongs to MetaTrader, select it and stop it.
Step 4: Remove MetaTrader 5 from Applications
Open Finder and go to:
Applications
Locate MetaTrader 5 or the broker-specific version of the platform.
The application may appear simply as:
MetaTrader 5
or it may include the name of your broker.
Move the application to the Trash.
You can either drag it into the Trash or right-click it and select:
Move to Trash
At this point, MetaTrader itself has been removed, but the cleanup is not yet complete.
Step 5: Open the User Library Folder
macOS hides the user Library folder by default.
To open it, activate Finder and click:
Go
in the top menu bar.
Hold down:
Option (⌥)
and the:
Library
option should appear.
Click it.
The location is normally:
/Users/YOUR_USERNAME/Library/
or, in short form:
~/Library/
From this point onward, proceed carefully.
The Library folder contains data for many applications, not only MetaTrader.
Step 6: Locate Remaining MetaTrader Files
The exact location of MetaTrader-related files on macOS can vary depending on the version you installed and how that version was packaged.
MetaTrader 5 on Mac may use a Wine-based compatibility environment, so its file structure can differ from that of a native macOS application.
Inside:
~/Library/
look for directories or files related to:
MetaTrader
MetaTrader 5
MetaQuotes
Wine
Also search for the name of the broker from which you installed MetaTrader.
Important: Do not delete every folder containing the word Wine.
Other software on your Mac may also depend on Wine.
Only remove files or directories that you have confirmed belong to the MetaTrader installation you are trying to reset.
Step 7: Check Application Support
One of the most important locations to inspect is:
~/Library/Application Support/
In Finder, press:
Command + Shift + G
and enter:
~/Library/Application Support/
Look for directories clearly related to:
MetaTrader
MetaQuotes
or your broker.
If you find a directory that clearly belongs to the MetaTrader installation you removed, and you have already backed up anything important, you can delete it.
Step 8: Check Containers
Depending on how your MetaTrader version was packaged, some application data may also be stored inside macOS containers.
Check:
~/Library/Containers/
and look for entries related to:
MetaTrader
MetaQuotes
or your broker.
You can also inspect:
~/Library/Group Containers/
Not every MetaTrader installation will use these locations, so the absence of MetaTrader-related folders here is normal.
Only remove items that clearly belong to the installation you are cleaning.
Step 9: Check Preferences
macOS applications may store settings inside:
~/Library/Preferences/
Open Finder, press:
Command + Shift + G
and enter:
~/Library/Preferences/
Look for files clearly associated with MetaTrader, MetaQuotes, or your broker-specific version.
Preference files commonly use the:
.plist
extension.
Delete only files that you have confirmed belong to MetaTrader.
Step 10: Remove MetaTrader Cache Files
Another location to inspect is:
~/Library/Caches/
Check this directory for cache files related to:
- MetaTrader
- MetaQuotes
- Your broker
If you find cache data that clearly belongs to the previous MetaTrader installation, you can remove it.
Cache files usually do not contain your primary trading configuration, but removing them can help make the reinstall cleaner.
Step 11: Check Saved Application State
macOS can store the previous state of certain applications.
Check:
~/Library/Saved Application State/
If you find an entry that clearly belongs to MetaTrader 5, you can remove it as part of the cleanup.
Step 12: Check Logs
For a more complete cleanup, also inspect:
~/Library/Logs/
If there are log files or directories clearly related to:
MetaTrader
MetaQuotes
or your broker, you can remove them.
Keep in mind that MetaTrader may also store its own logs inside its Data Folder.
Step 13: Do Not Forget the Actual MetaTrader Data Folder
The most important part of a true clean reinstall is making sure the previous Data Folder is removed.
If you used:
File → Open Data Folder
before uninstalling MetaTrader, you already know the exact location of the data directory associated with that installation.
That folder may contain directories such as:
MQL5
Profiles
Templates
Bases
Logs
Tester
Config
If your goal is a complete reset and you have backed up anything important, remove the data belonging to the previous MetaTrader installation.
This step is particularly important if you want to test an Expert Advisor or indicator in an environment that closely resembles a new user’s installation.
Step 14: Search for Your Broker's Name
Many brokers distribute branded versions of MetaTrader 5.
For this reason, not every MetaTrader-related file will necessarily contain the words MetaTrader 5.
Use Finder to search for your broker’s name as well.
Relevant names may include combinations such as:
Broker Name
MetaTrader
MT5
MetaQuotes
Do not delete files solely because they appear in search results.
Always inspect their location and confirm that they actually belong to the MetaTrader installation you want to remove.
Step 15: Empty the Trash
After removing MetaTrader and the confirmed files associated with the previous installation, empty the Trash.
Right-click the Trash icon and select:
Empty Trash
This permanently removes the deleted local files from the Trash.
Step 16: Restart Your Mac
Before reinstalling MetaTrader 5, restart your Mac.
Go to:
Apple Menu → Restart
Restarting helps ensure that:
- Old MetaTrader processes are completely closed
- Previous Wine-related sessions are terminated
- Locked files are released
- The new installation starts in a cleaner environment
Step 17: Perform a Final Check Before Reinstalling
After restarting your Mac, perform one final check before installing MetaTrader again.
First, inspect:
/Applications/
and make sure the previous MetaTrader application is gone.
Then review the relevant locations inside:
~/Library/
The main directories worth checking include:
~/Library/Application Support/
~/Library/Containers/
~/Library/Group Containers/
~/Library/Preferences/
~/Library/Caches/
~/Library/Saved Application State/
~/Library/Logs/
Also make sure the previous MetaTrader Data Folder that you identified through:
File → Open Data Folder
has been removed.
The goal is not to blindly delete every Wine or MetaQuotes-related file from your Mac.
The goal is to make sure that the data belonging to the specific MetaTrader 5 instance you are resetting no longer remains on the system.
Step 18: Reinstall MetaTrader 5
You can now install MetaTrader 5 again.
Download a new installer from your broker or another trusted source and complete the normal installation process.
When MetaTrader runs for the first time, it should recreate the directories and environment required by the new installation.
In a clean environment, your previous custom data should no longer appear automatically, including:
- Old custom Expert Advisors
- Old custom indicators
- Previous presets
- Previous templates
- Old profiles
- Previous local settings
- Old price history and cache
- Previous Strategy Tester data
- Previous logs
unless you manually restore them or MetaTrader later downloads or synchronizes some information.
How to Verify That MetaTrader 5 Was Cleanly Reinstalled
After installing the new version, open MetaTrader 5 and go to:
File → Open Data Folder
Inspect the new data directory.
In particular, check directories such as:
MQL5/Experts
MQL5/Indicators
MQL5/Scripts
MQL5/Presets
Profiles
Templates
Tester
If the clean reinstall was successful, your old custom Expert Advisors, indicators, presets, templates, and profiles should not be present in the new Data Folder unless you intentionally restored them.
MetaTrader 5 Clean Uninstall Checklist for macOS
Before reinstalling MetaTrader 5, make sure you have completed the following:
- Backed up important Expert Advisors, indicators, presets, and files
- Identified the current MetaTrader Data Folder before removing the application
- Completely quit MetaTrader 5
- Closed MetaEditor
- Checked Activity Monitor for remaining MetaTrader processes
- Removed MetaTrader 5 from Applications
- Removed the old MetaTrader Data Folder
- Checked ~/Library/Application Support/
- Checked ~/Library/Containers/
- Checked ~/Library/Group Containers/ where applicable
- Checked ~/Library/Preferences/
- Checked ~/Library/Caches/
- Checked ~/Library/Saved Application State/
- Checked ~/Library/Logs/
- Searched for files related to your broker-specific installation
- Removed Wine-related files only when you were certain they belonged to MetaTrader
- Emptied the Trash
- Restarted your Mac
- Performed a final check after restart
- Installed a fresh copy of MetaTrader 5
Important Note About Wine on MetaTrader for Mac
MetaTrader 5 on macOS may use a Wine-based compatibility layer.
Because of this, you may encounter Wine-related folders and processes while removing MetaTrader.
However, this does not mean that every Wine file should be deleted.
Other applications on your Mac may also use Wine.
A simple rule is:
Only remove a Wine prefix, folder, process, or environment when you are sure it belongs to the MetaTrader installation you are removing.
Deleting an unrelated or shared Wine environment may affect other applications.
Important Note for Users With Multiple MetaTrader Installations
If you have multiple MetaTrader installations or different broker-specific versions installed on your Mac, extra caution is required.
Each installation may have its own Data Folder or compatibility environment.
In this situation, one of the safest methods is to open each MetaTrader installation before removing it and use:
File → Open Data Folder
This allows you to identify the exact Data Folder associated with that specific instance and greatly reduces the chance of deleting data belonging to another MetaTrader installation.
When Is a Clean Reinstall of MetaTrader 5 on Mac Useful?
A clean reinstall can be useful in several situations.
Troubleshooting Unusual MetaTrader Problems
If MetaTrader is crashing, behaving unexpectedly, or experiencing persistent configuration-related issues, starting with a fresh environment can be an effective troubleshooting step.
Testing an Expert Advisor in a Fresh Environment
If you develop or distribute an Expert Advisor, a clean installation allows you to test whether the EA works correctly without relying on old files or configuration.
Removing Old Settings and Cache
Sometimes the problem is not the MetaTrader application itself. Old configuration files, cache data, profiles, or other stored information may cause unexpected behavior.
Simulating a New User Experience
If you develop Expert Advisors, indicators, or other MetaTrader tools, a clean environment is useful for testing the installation process from the perspective of a user installing your product for the first time.
Conclusion
Removing MetaTrader 5 from the Applications folder is not always enough to create a truly fresh installation on macOS.
For a more complete clean reinstall, you should remove not only the application itself, but also identify and remove the Data Folder and other files associated with the previous installation.
The overall process is:
Backup → Locate Data Folder → Quit MetaTrader → Check Activity Monitor → Remove Application → Remove Data Folder → Check Library → Remove Related Cache and Settings → Empty Trash → Restart → Reinstall
The most important step is identifying the correct MetaTrader Data Folder before uninstalling the platform by using:
File → Open Data Folder
When the process is completed correctly, you can reinstall MetaTrader 5 in a much cleaner environment and then add your Expert Advisors, indicators, and preferred settings from scratch.