Every time you connect to a remote server or Windows VPS using the native Windows Remote Desktop Connection client (mstsc.exe), Windows automatically saves the hostname or IP address into a recent connection history dropdown list and the local Windows Registry.
While convenient for frequent connections, this cached history can expose internal server IP addresses, ports, and usernames on shared workstations. This guide explains how to clear the Remote Desktop Connection history on Windows (via 1-line PowerShell command and Registry Editor) and macOS (via Windows App and Terminal).
Why clear the Remote Desktop dropdown history?
- Privacy & Security on Shared PCs: Prevents coworkers, family members, or unauthorized users from viewing the exact IP addresses and hostnames of your private servers.
- Removes Broken & Outdated Entries: Deletes expired VPS IPs, old test machines, and mistyped connection strings from the dropdown list.
- Prevents Accidental Connection Attempts: Stops users from accidentally clicking old server profiles with outdated credentials.
Method 1: Clear RDP history on Windows using PowerShell (Fastest)
You can wipe all cached RDP history entries and remove the local Default.rdp file instantly with one PowerShell command:
- On your local PC, right-click the Start menu and select Windows PowerShell or Terminal.
- Paste and run the following command:
# 1. Clear Registry MRU (Most Recently Used) list Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Terminal Server Client\Default' -Name "MRU*" -ErrorAction SilentlyContinue # 2. Clear Registry Server Cache Remove-Item -Path 'HKCU:\Software\Microsoft\Terminal Server Client\Servers\*' -Recurse -Force -ErrorAction SilentlyContinue # 3. Delete Hidden Default.rdp file from Documents folder Remove-Item -Path "$env:USERPROFILE\Documents\Default.rdp" -Force -ErrorAction SilentlyContinue - When you next launch
mstsc.exe, the Computer dropdown box will be completely blank.
Method 2: Clear RDP history manually via Windows Registry Editor
If you prefer inspecting and deleting individual connection entries manually:
Step 1: Delete Registry MRU entries
- Press Win + R, type
regedit, and hit Enter. - Navigate to the following key:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default - In the right pane, you will see entries named
MRU0,MRU1,MRU2(Most Recently Used). - Select and delete all
MRU*string values (do not delete the Default string itself).
Step 2: Delete cached server folders
- Navigate to:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers - Expand the Servers key. You will see sub-folders for each IP address or server name you connected to.
- Right-click on any IP folder you want to remove and click Delete.
Step 3: Delete the hidden Default.rdp file
- Open File Explorer and navigate to your Documents folder (
C:\Users\YourUsername\Documents). - In the top menu, click View > Show > Hidden items.
- Locate the hidden file named
Default.rdpand press Delete.
Method 3: Clear RDP history on macOS (Mac)
On Apple macOS running Microsoft Remote Desktop or Windows App:
Option A: From the application interface
- Open Windows App (or Microsoft Remote Desktop) from Launchpad.
- Locate the connection card for the server you wish to remove.
- Right-click (or secondary tap) the card and select Delete.
Option B: Via macOS Terminal (Complete Reset)
To completely reset all saved preferences and cached connection cards on Mac, open Terminal and run:
defaults delete com.microsoft.rdc.macos
rm -rf ~/Library/Containers/com.microsoft.rdc.macos/Data/Library/Preferences/com.microsoft.rdc.macos.plist
Frequently Asked Questions (FAQ)
Does clearing history delete my remote server data?
No. Clearing history only removes the saved IP address and login shortcut from your local computer’s client. Your remote server, files, and Windows VPS remain completely unaffected.
How can I save connections without cluttering the dropdown?
Instead of relying on the dropdown menu, configure your connection settings once in Remote Desktop Connection and click Save As… to generate a standalone .rdp file (e.g. WorkServer.rdp) that you can store in an encrypted folder or private directory.








