Answers.Body: <p>Yes, if you delete the assets from the S3 bucket and then have Craft re-index assets then they will be removed from the Craft assets directory. You'll probably want to grab a copy of the DB also, in case it becomes clear that those assets were actually in use somewhere!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-22T14:36:33.000Z
Answers.Text: Thank you Seth!
Answers.UserDisplayName: PatCraft
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-22T12:40:56.980Z
Answers.LastActivityDate: 2024-04-22T12:40:56.980Z
Answers.UserDisplayName: Seth Warburton
Body: <p>I inherited a CraftCMS project and there are currently close to 1200 obseletes pdf documents, still present in the site assets. The documents are stored in an S3 Bucket.</p>
  <p>What is the best way to do this without having to do it manually in Craft backend?</p>
  <p>Can I delete the documents (after making a backup...) directly from the bucket and ask Craft to reindex the bucket's contents?</p>
  <p>Thanks for any suggestions you may have.</p>
  
Tags: <craft3>
Title: How to batch delete obsolete PDF files from site assets
ThreadText: # How to batch delete obsolete PDF files from site assets
  
  (Asked by: username_0 on 2024-04-17)
  
  I inherited a CraftCMS project and there are currently close to 1200 obseletes pdf documents, still present in the site assets. The documents are stored in an S3 Bucket.
  
  What is the best way to do this without having to do it manually in Craft backend?
  
  Can I delete the documents (after making a backup...) directly from the bucket and ask Craft to reindex the bucket's contents?
  
  Thanks for any suggestions you may have.
  
  **Tags:** craft3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-04-22. Score: 1 | Accepted answer
  
  Yes, if you delete the assets from the S3 bucket and then have Craft re-index assets then they will be removed from the Craft assets directory. You'll probably want to grab a copy of the DB also, in case it becomes clear that those assets were actually in use somewhere!
  
  > **Comments:**
  > **username_0**: Thank you username_1!  
  
  ---
  
  