When you need to delete large amounts of files from an iDrive e2 bucket, doing it through the web interface can take hours or even days. The most efficient solution is to use AWS CLI from your Mac terminal, as it processes multiple files in parallel and significantly speeds up the process.
This guide shows you how to install and configure AWS CLI to delete folders or empty iDrive e2 buckets.
To follow this guide you need:
Homebrew is a package manager for Mac that makes it easy to install tools. Open Terminal and run:
To verify it was installed correctly:
With Homebrew installed, run:
You should see something like aws-cli/2.x.x Python/3.x.x Darwin/...
Create a specific profile for iDrive by running:
The system will ask for the following information:
jsonBefore deleting, verify that you can see the bucket contents. Replace the values with your information:
If you see the list of files and folders, the configuration is correct.
Run the following command to recursively delete all contents of a folder:
The process will display each file being deleted. Depending on the number of files, this may take minutes or hours.
If you have millions of files, you can increase speed by configuring more simultaneous connections:
After configuring this, run the delete command from Step 5 again.
If the process will take many hours, follow these steps to prevent your Mac from sleeping:
This will keep the Mac awake until you press Ctrl+C in that window.
If you prefer to be able to close the terminal:
To view progress:
To verify the process is still running:
Once the process is finished, verify the folder is empty:
If it shows no results, the deletion was successful.
aws s3 ls: Lists the contents of a bucket or folderaws s3 rm --recursive: Deletes files and subfolders recursivelyaws s3 rb: Removes an empty bucket--endpoint-url: Specifies the iDrive e2 server--profile idrive: Uses the credentials saved in the "idrive" profilecaffeinate -i: Prevents the Mac from entering sleep modenohup ... &: Runs a command in the background that continues even if you close the terminalNeed additional help? Contact our technical support team for personalized assistance.