To stop the two PCs from affecting each other and to prevent files from being uploaded to the cloud, OneDrive sync must be disconnected or limited on the second PC (and adjusted on the first if needed).
- Unlink OneDrive on the second PC
This breaks sync so deleting files on that PC will no longer delete them from the first PC or from OneDrive in the cloud.
On the second PC:
- Select the OneDrive cloud icon in the notification area (system tray) to open the OneDrive pop‑up.
- Select the OneDrive Help & Settings icon, then choose Settings.
- Go to the Account tab.
- Select Unlink this PC, then Unlink account.
- After this, the OneDrive folder on that PC stops syncing. Files already in the local OneDrive folder may remain on disk, but changes will no longer propagate to the cloud or the other PC.
If sign‑in data needs to be fully cleared on that PC:
- Press Windows key + R.
- Enter
%localappdata%\Microsoft\OneDrive\settings and select OK.
- Delete the
PreSignInSettingsConfig.json file.
- Control which folders sync (if keeping OneDrive but limiting it)
If OneDrive should remain signed in but only certain folders should sync locally:
- Use Choose which folders to sync to your computer (from OneDrive settings) to unselect folders that should not appear or sync on that PC. When folders are un‑synced, they are removed from File Explorer on that PC but remain in the cloud and on other devices.
Note: When folders are un‑synced, the files are removed from File Explorer on that computer only; they remain available in OneDrive on the web or in other synced locations.
- Prevent files saved on the PC from going to the cloud
To keep new files local only:
- Save files into folders that are not inside the OneDrive folder (for example,
C:\Users\<name>\Documents if that path is not redirected to OneDrive).
- If OneDrive had been set to back up Desktop/Documents/Pictures, turn off those backup options in OneDrive settings, then move files out of the OneDrive‑managed folders into purely local folders.
- If needed, re‑link OneDrive correctly later
If OneDrive needs to be set up again on any PC after unlinking:
- Start OneDrive and sign in when prompted.
- When asked about an existing OneDrive folder, choose Use this folder (or Choose new folder to move it).
- After initial sync, use Choose which folders to sync to your PC so only desired content is synced.
Once OneDrive is unlinked on the second PC and folders are adjusted, files can be deleted from that PC without affecting the original PC or the cloud copy.
References: