This article explains how to delete all files stored on a USB stick using a Windows computer or a Mac.
Steps
Method 1 of 2: Windows
Step 1. Connect the USB memory drive to your computer
You can use any of the computer's working USB ports.

Step 2. Double-click the This PC tab
It is displayed on the left side of the "File Explorer" system window.
To open the "File Explorer" window press the key combination ⊞ Win + E, then click on the item This PC.

Step 3. Select the USB key icon with the right mouse button
It is visible within the "Devices and Drives" section displayed within the right pane of the "File Explorer" window. A context menu will be displayed.

Step 4. Click on the Format… option
The "Format" dialog box will appear.

Step 5. Click the Start button
It is located at the bottom of the window that appeared. A warning message will appear informing you that all data on the USB stick will be erased.

Step 6. Click the OK button
At this point Windows will format the USB drive. At the end of the operation, the warning message "Formatting complete" will appear on the screen.

Step 7. Click the OK button
The window containing the warning message will be closed.
Method 2 of 2: macOS
Step 1. Connect the USB memory drive to the Mac
You can use any of the computer's working USB ports.

Step 2. Open a Finder window by clicking on the icon
It is located on the System Dock.

Step 3. Open the Applications folder
Click on the item Applications displayed on the left side of the window or double-click the "Applications" folder displayed within the right pane.

Step 4. Double-click the Utilities folder

Step 5. Double-click the Disk Utility icon

Step 6. Select the USB drive to format
It is listed in the left pane of the window.

Step 7. Click on the Initialize tab
It is located at the top of the window, above the right pane.

Step 8. Select a file system
The default Mac file system is Mac OS Extended (Journaled) and it should be the right one in most cases.
If you want to format the USB stick so that it can be used on a Windows computer, select the file system MS-DOS (FAT).

Step 9. Click the Initialize… button
It is located in the lower right corner of the window. A confirmation message will be displayed.

Step 10. Click the Initialize button again
All data on the selected USB drive will be deleted.