Your computer's search history (which includes recently viewed files and search suggestions) can be deleted, whether on Windows or Mac. If you want to delete your online search history, you will need to delete your browser history from your browser settings.
Steps
Method 1 of 4: Clear search history on Windows

Step 1. Click on Cortana's search box
This search box is on the left of the taskbar, right next to the Windows logo. Click on it to open the Cortana window.
- If you don't have this option, right click on the taskbar, select Cortana then click on Show search box.

Step 2. Select Settings

This option is on the left of Cortana's window. Click on it to open Cortana's settings in the window.

Step 3. Go to the option Clear my search history
You will find it under the heading History of my device. Click on it to clear the search history on your device.

Step 4. Click Search History Settings
This link opens a Bing page with all your searches listed in chronological order.
If you are not connected to the Internet, you will not be able to access this page

Step 5. Select Change History Settings
This header is at the top of the Bing page. Click on it to display a menu below.

Step 6. Click Clear All
Clear All is in the Clear Search History section of the menu.

Step 7. Choose Yes at the command prompt
This will delete all of Cortana's search history, whether it's on your machine or online.
Method 2 of 4: Clear file history on Windows

Step 1. Open the Start menu

Click on the Windows logo at the bottom left of the screen.
You can also press the ⊞ Win key on your computer keyboard

Step 2. Open File Explorer

Click the folder icon in the lower right corner of the Start window.

Step 3. Go to the Display tab
You'll find it at the top left of the File Explorer window. Click on it to display a menu below.

Step 4. Click Options
It's the box icon on the far right of the View menu.

Step 5. Go to the General tab
You'll find it in the upper left corner of the Folder Options window.

Step 6. Select Clear
This option can be found in the Privacy Statement section at the bottom of the window. Click on it to remove your recent searches from File Explorer.
Folders or files that you pinned to File Explorer will not be deleted

Step 7. Hide your future search history
Clear the Show recently used files in Quick access and Show recently used folders in Quick access check boxes in the Privacy statement section. This option is optional, but it will prevent searched items from appearing in the File Explorer search bar.

Step 8. Click OK
This button is located at the bottom of the folder options window. File Explorer history should now be completely empty.
Method 3 of 4: Clear file and application history on Mac

Step 1. Open the Apple menu

Click on the apple logo in the upper left corner of the screen.

Step 2. Select Recent Items
This option is at the top of the Apple drop-down menu. Click on it to display a context menu with a list of recently opened apps and files.

Step 3. Choose Clear Menu
This option is at the bottom of the menu that just opened. Click on it to delete everything in it.
Method 4 of 4: Delete folder history on Mac

Step 1. Open Finder
It's the blue face icon in your Mac's Dock.
You can also just click on your desktop

Step 2. Click Go
This item can be found on the left of your Mac's menu bar at the top of the screen. Click on it to open a drop-down menu.

Step 3. Select Recent Folders
This option is at the bottom of the Go drop-down menu. Click on it to open a pop-up window showing your recently opened folders.

Step 4. Choose Clear Menu
You will see this button at the bottom of the context menu. Click on it to clear the list of recently opened folders.