title: How to Remove a Specific Tag from an S3 file with AWS CLI
body: <p>I have a file stored in AWS S3 which has a tag of the 'retention' type set to '1d'.
  The following example command will show this:</p>
  
  <pre><code>aws s3api get-object-tagging --bucket my-bucket --key "directory/subdirectory/My Test File.xlsx"
  
  {
      "VersionId": "3KD8GJ4NDNVJFJ4Jjfj4j",
      "TagSet": [
          {
              "Value": "1d",
              "Key": "Retention"
          }
      ]
  }
  </code></pre>
  
  <p>I wish to remove this tag, but <em>only</em> this tag. In the case where there is a file with two tags within the Tag Set, I don't want both to be removed -- just the Retention tag.</p>
  
  <p>I've researched the <a href="https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object-tagging.html" rel="nofollow noreferrer">delete-object-tagging</a> documentation, which seems to indicate you can remove a <em>Tag Set</em> entirely -- but not a specific tag.</p>