How to install Latest version of Apache Solr on Ubuntu and how to uninstall (remove) completely


1 Answer 1


An older version of solr

An older version of solr-tomcat and solr-jetty is in the Ubuntu Universe repositiories, for a newer version see below.

sudo add-apt-repository universe

For Tomcat

sudo apt-get install solr-tomcat

For Jetty

sudo apt-get install solr-jetty

Open the URL http://localhost:8080/solr/admin/, if your tomcat is listen on port 8080.


sudo apt-get remove solr-tomcat
sudo apt-get remove solr-jetty

A newer version of solr

Use the manual installation for a newer version, check the latest version here and replace the version in the commands below, for old versions check here

cd ~
wget http://archive.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz
tar xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2
sudo chmod +x install_solr_service.sh
sudo ./install_solr_service.sh solr-5.3.1.tgz

Open the URL http://your_server_ip:8983/solr

More details

Uninstall via

sudo service solr stop
sudo rm -r /var/solr
sudo rm -r /opt/solr-5.3.1
sudo rm -r /opt/solr
sudo rm /etc/init.d/solr
sudo deluser --remove-home solr
sudo deluser --group solr

For a better explanation of the uninstall steps, read my answer here.

  • Seems to me the latest release is 5.3. 14.04 has 3.6.
    – muru
    Sep 24, 2015 at 9:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .