# Capistrano and "the task \`cleanup' does not exist"

**URL:** <https://www.ruby-forum.com/t/capistrano-and-the-task-cleanup-does-not-exist/170716>\
**Category:** Rails\
**Created:** [June 21, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/capistrano-and-the-task-cleanup-does-not-exist/170716 "2009-06-21T19:36:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickflux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/838e76/32.png) [@nickflux](https://www.ruby-forum.com/u/nickflux)\
**Post date:** [June 21, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/capistrano-and-the-task-cleanup-does-not-exist/170716/1 "2009-06-21T19:36:41Z")

</div>

I use Capistrano for deploying my apps, and have been doing so for a  
while. I  
keep seeing references to the ‘cleanup’ task, as in:

desc “Cleanup after every deployment”  
task :after\_deploy do  
cleanup  
end

But I don’t seem to have this task available. It doesn’t show up when  
I run  
cap -T. Anyone know how I get hold of this task and others.

I am using Rails 2.3.2 and Capistrano 2.5.5

Thanks for your help,

Nick

---

<div class="post-metadata">

**Author:** ![nickflux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/838e76/32.png) [@nickflux](https://www.ruby-forum.com/u/nickflux)\
**Post date:** [June 22, 2009, 1:32am UTC](https://www.ruby-forum.com/t/capistrano-and-the-task-cleanup-does-not-exist/170716/2 "2009-06-22T01:32:53Z")

</div>

Thanks. That’s worked a treat.

Nick

On Jun 21, 3:58 pm, Marnen Laibow-Koser \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![nickflux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/838e76/32.png) [@nickflux](https://www.ruby-forum.com/u/nickflux)\
**Post date:** [June 21, 2009, 9:58pm UTC](https://www.ruby-forum.com/t/capistrano-and-the-task-cleanup-does-not-exist/170716/3 "2009-06-21T21:58:53Z")

</div>

nickflux wrote:

> I use Capistrano for deploying my apps, and have been doing so for a  
> while. I  
> keep seeing references to the ‘cleanup’ task, as in:
> 
> desc “Cleanup after every deployment”  
> task :after\_deploy do  
> cleanup  
> end
> 
> But I don’t seem to have this task available.  
> […]

Assumning a standard Capistrano setup, that task is in the deploy  
namespace, so try cap deploy:cleanup.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
