Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Proper way to delete a project and its attachments

Sherryl Radbil
Contributor
June 26, 2019

I manually deleted a few projects a couple of months ago by deleting them in Jira, then deleting schemes and such related to them.

The disk was getting full and it turns out that the space hog is

/var/atlassian/application-data/jira/data/attachments

Examining that shows attachment directories for the deleted projects still there.

1. Can I simply "rm -rf" those directories for the deleted projects?

2. Is there documentation showing the proper steps for delete a project?

Thanks in advance,

Sherryl

3 answers

2 accepted

0 votes
Answer accepted
Sherryl Radbil
Contributor
July 2, 2019

To follow up, here is the answer from Atlassian in my ticket. Note that she does not mention the thumbs directory and files, but my experience is that they are left behind as well.

 

I have done a few tests with all my local instances and I can confirm that when we delete a project, the application Jira won't delete the folders and the sub-folders, just the attachments. So I believe the best approach on your case is to delete them through rm -rf command as you suggested.

 This approach is just ideal if the project was already deleted through the UI.

0 votes
Answer accepted
Jeff Foarde
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 30, 2019

Hey Sherryl,

 

We've been dealing with this as well; only thing that I ever found was manually deleting those attachments in the attachments folder.  Similarly, If you ever have to migrate, you have to move those separately, and if you rename the project, the attachment folder name stays whatever the original was.  Near as I can tell, there's no way to edit or manage attachments properly from the web application.  Even most of the plugins don't work consistently, since Atlassian keeps changing how the API access.

 

Order is important, though.  Delete the project FIRST, then the Attachments SECOND.  If you delete attachments and don't leave at least an empty folder behind, you'll get an error in JIRA.

 

Good luck!

Sherryl Radbil
Contributor
July 1, 2019

Thanks for the response, Jeff, and the tip about deleting the project before the attachments.

I noticed something else, that if you look at actually what was left behind, it's just thumbs. Turns out the rest of the attachments were actually deleted.

CNE/CNE-2124/thumbs:
total 56K
drwx------ 2 jira jira 4.0K Feb 24  2015 .
drwx------ 3 jira jira 4.0K May  8  2018 ..
-rwx------ 1 jira jira 8.8K Feb 24  2015 _thumb_49838.png
-rwx------ 1 jira jira  12K Feb 24  2015 _thumb_49839.png
-rwx------ 1 jira jira 8.8K Feb 24  2015 _thumb_49840.png
-rwx------ 1 jira jira  12K Feb 24  2015 _thumb_49841.png
[root@sr-prd-dal09-sd-01-p attachments]#

I've opened a ticket with Atlassian to ask about this odd behavior and will update here if I hear back with useful info.

0 votes
Victor Mutambuki
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2019

Sherryl,

Do you prefer to delete instead of archiving?

Victor

Sherryl Radbil
Contributor
June 26, 2019

Yes, Victor. We cloned an instance and in the original and the new deleted the unneeded projects. Thanks for the quick reply!

Suggest an answer

Log in or Sign up to answer