Welcome Guest | Login

How do I delete old versions of my application from my Subversion repository?

I'm starting to run out of space and need to delete some of my older revisions. I tried looking through the SVN documentation, but I couldn't find clear instructions.

Are there instructions somewhere for this?

2008-06-29 08:08 AM

You may need to run a cronjob to delete the directories that are older than what is required using a bash script.

for eg: the command below would delete directories older than "X" days.
find /home/user/<revision_direcory>/ -mtime +X -type d | xargs rm -rf

replace "x" with your preferred date.

2008-06-29 09:34 AM

It's my understanding that this can also be handled through capistrano. Can you recommend the best approach for removing old versions using capistrano?

2008-06-29 10:30 AM

You can just add the rm commands in your Capfile restart task.  

I know there is also a deploy.rb line that limits the number of releases, I can't seem to find via Google at the moment but I'll keep looking...

2008-06-29 11:23 AM

I did some googling and came up with this:

Put this line in your deploy.rb:

set :keep_releases, 4

Change the last number to how many releases you want to keep. Save your file.

From your application folder type:

cap deploy:cleanup

It may take a few minutes to finish depending on how many releases you have archived.

2008-06-29 12:01 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!