I just uninstalled tomcat6 and installed tomcat7, and now that I want to start, stop or restart the service, ubuntu shows the two of them, for example

sudo service tomcat

And then ubuntu shows two alternatives, for both tomcat6 and tomcat7, but I don't have and I don't want tomcat6 to appear there, What should I do?


just clean the tomcat6 referred lines in /etc/init.d/tomcat could solve your question.

after clean the file may like that:


case $1 in

 echo “starting tomcat7 from $TOMCATPATH”
 sh $TOMCATPATH/bin/startup.sh

 echo “stopping tomcat7 from $TOMCATPATH”
 sh $TOMCATPATH/bin/shutdown.sh

 $0 stop
 $0 start

 echo $”usage: $0 {start|stop|restart}”

exsit 0

suggestion to uninstall a software:

sudo apt-get purge xxxx-software

purge will also removes config files.

|improve this answer|||||
  • It doesn't work. – eLRuLL May 9 '13 at 16:20
  • @eLRuLL how did you uninstall tomcat6 and what's the content of /etc/init.d/tomcat – Teifi May 10 '13 at 1:40
  • uninstall with apt-get remove tomcat6, and I have tomcat6 and tomcat7 on /etc/init.d/, about the content, they are both similar. – eLRuLL May 10 '13 at 2:43
  • @eLRuLL updated answer, hope it could help u. – Teifi May 10 '13 at 4:07
  • but there is no /etc/init.d/tomcat file there are both tomcat6 and tomcat7 files. – eLRuLL May 10 '13 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.