How to Fix 'Cannot remove bucket - The bucket that you tried to delete is not empty
Step-by-step guide for resolving bucket deletion errors when buckets contain objects that prevent removal.
Introduction
When you try to delete a bucket in the Impossible Cloud Storage Console, you may encounter this error message:
Cannot remove bucket [bucket-name] - The bucket that you tried to delete is not empty.
This error occurs because Impossible Cloud Storage requires buckets to be completely empty before they can be deleted as a safety measure to prevent accidental data loss. This guide explains why this error appears and provides step-by-step instructions to properly empty and delete your bucket.
Prerequisites
Before starting the deletion process, ensure you have:
- Root access to your Impossible Cloud account via the Storage Console
- Administrative access to disconnect any applications using the bucket
Why This Error Occurs
The "bucket is not empty" error appears when your bucket contains any of the following:
- Visible objects: Files, folders, (any data uploaded to the bucket)
- Object versions: Previous versions of files when versioning is enabled
- Delete markers: Markers created when objects are deleted in versioned buckets
- Incomplete multipart uploads: Partially uploaded files that weren't completed
Even if your bucket appears empty in the Storage Console interface, it may still contain hidden objects or versions that prevent deletion. The most reliable way to ensure complete deletion is to use the built-in "Empty Bucket" feature.
How to Fix the "Bucket is not empty" Error
To resolve this error and successfully delete your bucket, follow this two-phase process: first empty the bucket completely, then delete the empty bucket. The entire process can take from a few hours to several days depending on the bucket size and the number of objects. Usually, deleting a bucket with a few millions objects inside (Veeam use case) might take a day or two.
Step 1: Disconnect all applications
Before emptying the bucket is started, completely disconnect all applications that use it. This prevents new objects from being uploaded during the emptying process.
Examples of applications to disconnect:
- Backup solutions: Remove the bucket configuration from Veeam, Acronis, or other backup software
- Sync applications: Disconnect cloud sync tools that may be using the bucket
- Custom applications: Update any custom software to use a different bucket or disable the connection
- Third-party integrations: Remove bucket references from any integrated services
Step 2: Schedule bucket emptying in the Storage Console
- Login to the Storage Console
- Navigate to the 'Buckets' tab to view all your buckets
- Locate the bucket that's showing the deletion error and click the cogwheel on the right
- Enable the "Emptying the bucket" switch
Timing information:
- The emptying process will begin exactly 24 hours after enabling
- This 24-hour delay is fixed and cannot be changed
- The actual emptying may take hours to several days depending on bucket size
- Deletions have lower priority compared to other storage operations
Delete the Empty Bucket
Once the emptying process is complete you will be able to delete the bucket.
Additional Information
- Data permanence: Once the emptying process completes, all data is permanently deleted and cannot be recovered
- Billing: You continue to be charged for storage until the emptying process is complete
Objects protected by Object Lock (immutable objects) will NOT be deleted during the emptying process. If your bucket contains objects with Object Lock enabled, you must wait until the Object Lock retention period expires for all objects, then run the "Empty Bucket" process again to remove the previously protected objects. Successful bucket deletion is only possible after all Object Lock protections have expired and the bucket has been emptied completely.
Common Issues and Solutions
If storage usage is not decreased
- Please wait up to 4 hours and check again. The usage should be synchronized afterwards.
If new objects appear during or after emptying:
- Review all application configurations thoroughly
- Check for automated backup schedules that may still be active
- Verify that API keys or connection strings have been updated in all systems
- Wait an additional 24-48 hours for eventual consistency
- Contact support if objects persist beyond this timeframe
When contacting support, please provide:
- Your bucket name
- Any error messages encountered: text and screenshot
- The approximate timing of when you initiated the emptying process