REMOVE THAT ANNOYING ONEDRIVE
How to remove OneDrive from File Explorer
To be clear, this method will not uninstall or disable OneDrive, but just remove the drive from the list of drives shown in File Explorer. OneDrive can be uninstalled by scrolling through applications found under the Settings | Apps & Features configuration screens.
Type “regedit” into the Windows 10 search box on your desktop and select the registry editor application. Using the left-hand navigation window of regedit, navigate to this key:
HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}
There are dozens of entries in the folder so check the CLSID number twice to be sure you’re at the right spot, as shown in Figure A.
Figure A

In the right-hand window, double-click the entry with the name: System.IsPinnedToNameSpaceTree
As shown in Figure B, change the Value data box to 0 (zero) to disable the setting and then click OK to complete.
Figure B

If you are using the 64-bit version of Windows 10, you will also have to edit a second key. Using the left-hand navigation window of regedit, navigate to this key:
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}
As before, there are dozens of entries in the folder so check the CLSID number twice to be sure you’re at the right spot, as shown in Figure C.
Figure C

In the right-hand window, double-click the entry with the name: System.IsPinnedToNameSpaceTree
As shown in Figure D, change the Value data box to 0 (zero) to disable the setting and then click OK to complete.
Figure D

Exit the Registry Editor application and OneDrive should be gone from File Explorer. If it is not gone immediately, reboot the PC.
Bonus method to remove OneDrive from File Explorer
For Windows 10 Pro and Enterprise users, the preferred method to disable the personal version of OneDrive and remove it from File Explorer is through the Local Group Policy editor. Presumably, this is because in an enterprise or business setting, a more formal and managed cloud storage system will be implemented.
Type “gpedit” into the Windows 10 search box on your desktop and select the Local Group Policy editor application. Using the left-hand navigation window of gpedit, navigate to this folder:
Computer Configuration\Administrative Templates\Windows Components\OneDrive
As shown in Figure E, there are less entries to deal with than with our Registry File hack.
Figure E

Double-click the Prevent the usage of OneDrive for file storage policy listed in the right-hand windowpane and change the value to Enabled, as shown in Figure F and click OK to complete. This will disable this version of OneDrive and remove it from Windows File Explorer.
Figure F

To reenable or return OneDrive to Windows 10 File Explorer, just reverse these procedures.