owner_slack | title | section | layout | parent | last_reviewed_on | review_in |
---|---|---|---|---|---|---|
#2ndline |
Remove an asset |
Assets |
manual_layout |
/manual.html |
2017-09-04 |
6 months |
If you need to remove an asset manually from assets.publishing.sevice.gov.uk
,
follow these steps:
ssh asset-master-1.production
sudo find / -name some-asset.pdf
sudo rm /mnt/uploads/asset-manager/assets/.../some-asset.pdf
ssh backend-1.production
govuk_app_console asset-manager
asset = Asset.find("asset-id-from-url")
(e.g.57a9c52b40f0b608a700000a
)- Check the asset is what you think it is and delete:
asset.destroy
- Navigate to your local fabric-scripts directory
fab production cdn.purge_all:'/media/.../some-asset.pdf
- Check that the asset responds with a 404
* Note: You might need to look at the timestamps or other information to figure out which records to delete if two assets share the same filename.