Deleting files

How to delete files from your website

When you upload a file to your site, Drupal creates a media item (a reference or pointer to the file). To fully delete a file from your site, you should delete the media item as well. 

This will make sure that both items are deleted from your site and no longer indexed by search engines.

Step 1: Find the file you want to delete

  1. Log in to your site and go to Content > Media > Media Library.
  2. Look for the file you want to delete from the list of files (or use the search function to search for the file).
  3. Click on the edit icon for the file you want to delete (the icon looks like a pencil).
  4. You will see a Delete tab at the top of the page, as well as a Delete button at the bottom of the page next to the Save button.
  5. Click on Delete. You will be asked to confirm if you’re sure you want to delete the media item (keep in mind that this action cannot be undone). Make sure you also check the checkbox labeled Also delete the associated file?

These steps will remove the media item as well as the underlying file that’s associated with it.

Please note: If a file has already been indexed by Google or other search engines, it may take a few days for the Google search result for that file to disappear after you delete it from your site. 


Related resources

Support and feedback options for HarvardSites Drupal

Submit a ticket

If you encounter any issues or bugs with the HarvardSites Drupal platform, please submit a ticket through the HUIT Service Desk.

Share website feedback

If you have ideas for how to improve the HarvardSites User Guide website, please submit your ideas using our website feedback form.

Design System How-To Guides

Practical guides and how-tos for using HarvardSites features to build engaging, effective websites that support your department’s goals.

AI Support chatbot

Try our new AI-powered support chatbot to answer questions about the Drupal platform.