405 Method DELETE not supported (AEM 6.3 SP2)

important_monke 07-06-2018

I need to clean a publish instance of several large assets and have done so on author by generating a list and deleting with cURL commands like:

curl -u admin:admin -X DELETE "http://localhost:4503/content/dam/abc/def/images/shirts.png"

it works on author but on publish, the result is the following ...



    <head><title>405 Method DELETE not supported</title></head>


        <h1>Method DELETE not supported</h1>

        <p>Cannot serve request to /content/dam/abc/def/images/shirts.png on this server</p>


        <address>Apache Sling</address>



The admin account is in the administrators group on the publish instance. I've tried cURL with admin and with a different privileged user on the publish instance, each appear to have all (including delete) permissions on the nodes in question.

I've enabled crxde on this publish instance.

Is there some place I must configure to allow the DELETE method?

Once I can delete these, I know garbage collection will ultimately reclaim the space.


Accepted Solutions (1)

Accepted Solutions (1)

aneeta45259594 07-06-2018

I believe the issue you're facing is because the following bundle [1] is not available on your Publish instance. And this is expected if you've setup your instance with nosamplecontent runmode as per Running AEM in Production Ready Mode . If you need this for your use case, you can get the bundle from the Author server and install it on the Publish server to move forward with your use-case.

Ideally, you should not be deleting anything directly on Publish instance. Unpublish from Author first should help.

Best Regards,


[1] Apache Sling Simple WebDAV Access to repositories (org.apache.sling.jcr.webdav)

Answers (2)

Answers (2)

important_monke 07-06-2018

Thanks Aneet,

I was running with nosamplecontent, not because it was prod, but because I didn't want sample content. Indeed, the publish was missing "Apache Sling Simple WebDAV" bundle -- I copied it over from the author and installed it on publish, but still received the 405.

It wasn't until I reconfigured this bundle's config (to match the author's) that I was able to successfully delete the files via cURL.

Any idea why?

I changed:

- Root Path from -- /dav to /crx/repository

- Non Collection Node Types -- added dam:Asset

mirroring the author's values for Apache Sling Simple WebDAV.

Can you tell me what these fields represent and why it was required for my cURL -X DELETE commands to work?

I appreciate the advice about deactivating instead, but the goal here was simply to remove the largest binary files of various types. I did a query of the largest .zip, .exe, .jpg, .psd, .iso, etc. files, and used this to form my list of files to delete. The instances are for Dev, so consistency was not required, the more important objective was getting these instances running on the available limited disk of our Dev hardware. Additionally, I wanted to delete the largest files on both instances, not necessarily files that were active or inactive.

Thanks again!