I used this command to delete all the files in it and delete the bucket itself.
aws s3 rb s3://<bucket_name> --force
It did delete the files in the bucket but gave an error
remove_bucket failed: s3://<bucket> An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty. You must delete all versions in the bucket.
The bucket is empty. Versioning was never enabled. But in the console, when clicked on "show" , I can see files that are marked 'delete'.
But, shouldn't the --force delete them as well. I need to write an aws cli command to delete all files in an s3 bucket and the bucket. The first command simply fails. But that is all the documentation states.