• To install OneDrive with WinGet open Command Prompt as admin and run the “winget install Microsoft.OneDrive” command.
  • To uninstall OneDrive with WinGet open Command Prompt and run the “winget uninstall Microsoft.OneDrive” command.

On Windows 10 (or Windows 11), you can use the Windows Package Manager (WinGet) command to install or uninstall the OneDrive sync client application. Although OneDrive comes installed by default on every installation of Windows, sometimes, you may need to reinstall the client because it is not working correctly. Or you may need to remove it because you don’t use it. 

Regardless of the reason, on Windows, in addition to downloading and installing the client manually from the Microsoft website, you can also use the WinGet tool to install and uninstall the app.

WinGet is a command-line tool designed to make it easier to automate the process of searching, downloading, installing, upgrading, and configuring applications on your computer. The tool was thought out for developers, but anyone can install apps, such as OneDrive, Microsoft Teams, and VirtualBox.

In this guide, you will learn how to add or remove the OneDrive application on either Windows 10 or Windows 11.

  • Install OneDrive on Windows 11
  • Uninstall OneDrive on Windows 11

Install OneDrive on Windows 11

To install OneDrive on Windows 11, use these steps:

  • Open Start on Windows 11.
  • Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  • Type the following command to search the app and press Enter:
  • winget search OneDrive
  • Type the following command to install OneDrive on Windows 11 (or 10) using the app ID and press Enter:
  • winget install Microsoft.OneDrive

Once you complete the steps, the Windows Package Manager will download and install the OneDrive app automatically on Windows.

Open Start on Windows 11.

Search for Command Prompt, right-click the top result, and select the Run as administrator option.

Type the following command to search the app and press Enter:

winget search OneDrive

Type the following command to install OneDrive on Windows 11 (or 10) using the app ID and press Enter:

winget install Microsoft.OneDrive

Uninstall OneDrive on Windows 11

To uninstall OneDrive on Windows 11 with commands, use these steps:

  • Open Start.
  • Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  • (Optional) Type the following command to view a list of the app you can uninstall with the Windows Package Manager and press Enter:
  • winget uninstall
  • Type the following command to uninstall the OneDrive app from Windows 11 and press Enter:
  • winget uninstall Microsoft.OneDrive

After you complete the steps, the OneDrive sync client application will be removed from your computer.

Open Start.

(Optional) Type the following command to view a list of the app you can uninstall with the Windows Package Manager and press Enter:

winget uninstall

Type the following command to uninstall the OneDrive app from Windows 11 and press Enter:

winget uninstall Microsoft.OneDrive