Deleting attachments from the application EAR file

You might want to delete attachments from the application EAR file to make space on your system.

About this task

Attachments are deleted by using a file-based operation, not a directory-based operation. Deleting directories is not supported.

To delete files from the application EAR file:

Procedure

  1. Prepare a file that is called ibm-partialapp-delete.props that lists the files that you want deleted to the scope of the Stores.war.
    For example, you might want to delete the following files:
    • /opt/IBM/WebSphere/AppServer/profiles/instance_name/installedApps/WC_ins tance_name_cell/WC_instance_name.ear/Stores.war/ConsumerDirect/attachment/sampleImage01.jpg
    • /opt/IBM/WebSphere/AppServer/profiles/instance_name/installedApps/WC_instance_name_cell/WC_instance_name.ear/Stores.war/ConsumerDirect/attachment/sampleImage02.JPG
    The contents of the ibm-partialapp-delete.props file would look similar to the following code:
    ConsumerDirect/Attachment/sampleImage01.jpg
    ConsumerDirect/Attachment/sampleImage02.JPG 
  2. Create the following directory structure (at the root of a drive). Save your file in this new directory.
    Stores.war/META-INF/ibm-partialapp-delete.props
    
  3. Create a compressed file that maintains the directory structure.
  4. Log in to the WebSphere Application Server Admin Console. Click Applications > Enterprise Applications.
  5. Select your WC_enterprise_application. Click Update.
  6. Select Partial Application.
  7. Browse the local system and find the ibm-partialapp-delete.zip compressed file. Click Next.
  8. Click OK. This part can take a few minutes. When the update is complete, the message "Update of WC_enterprise_application has ended", displays.
  9. Click Save to Master Configuration; then click Save.

What to do next

The attachment is deleted from the application EAR file.