# How To Remove Unnecessary Controllers?

**URL:** <https://www.ruby-forum.com/t/how-to-remove-unnecessary-controllers/58049>\
**Category:** Rails\
**Created:** [April 18, 2006, 12:28am UTC](https://www.ruby-forum.com/t/how-to-remove-unnecessary-controllers/58049 "2006-04-18T00:28:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtoy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@jtoy](https://www.ruby-forum.com/u/jtoy)\
**Post date:** [April 18, 2006, 12:28am UTC](https://www.ruby-forum.com/t/how-to-remove-unnecessary-controllers/58049/1 "2006-04-18T00:28:20Z")

</div>

Hi All,

I’ve got some controllers in my project which I no longer need. –  
They were generated by scaffolding.

Is there an easy way to remove them? – I.E. via the command-line.

If not, is there a way to do it manually?

Thanks!

: )

Jason

---

<div class="post-metadata">

**Author:** ![jtoy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@jtoy](https://www.ruby-forum.com/u/jtoy)\
**Post date:** [April 18, 2006, 12:39am UTC](https://www.ruby-forum.com/t/how-to-remove-unnecessary-controllers/58049/2 "2006-04-18T00:39:04Z")

</div>

Jason T. wrote:

> Hi All,
> 
> I’ve got some controllers in my project which I no longer need. –  
> They were generated by scaffolding.
> 
> Is there an easy way to remove them? – I.E. via the command-line.

Check out the “script/destroy” command

–  
Josh S.  
[http://blog.hasmanythrough.com](http://blog.hasmanythrough.com)

---

<div class="post-metadata">

**Author:** ![jtoy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@jtoy](https://www.ruby-forum.com/u/jtoy)\
**Post date:** [April 18, 2006, 12:58am UTC](https://www.ruby-forum.com/t/how-to-remove-unnecessary-controllers/58049/3 "2006-04-18T00:58:43Z")

</div>

You can delete them like you would any file. There is nothing magical  
about a controller that never gets called. My apps have models that  
don’t have controllers and controllers that don’t have a model.

Jason T. wrote:

> Hi All,
> 
> I’ve got some controllers in my project which I no longer need. –  
> They were generated by scaffolding.
> 
> Is there an easy way to remove them? – I.E. via the command-line.
> 
> If not, is there a way to do it manually?
> 
> Thanks!
> 
> : )
> 
> Jason
