[Ubuntu] Completely uninstall jenkins installed through the deb package

To completely uninstall Jenkins installed via Deb package, you can follow the steps below:

  1. Stop the Jenkins service: First, stop the Jenkins service to ensure it is no longer running.

    sudo systemctl stop jenkins
    
  2. Disable Jenkins service: Set the Jenkins service not to start automatically at system startup.

    sudo systemctl disable jenkins
    
  3. Uninstall the Jenkins package: Use the apt-get command to uninstall the Jenkins package.

    sudo apt-get remove jenkins
    
  4. Delete Jenkins configuration and data: Uninstalling a package does not delete Jenkins configuration and data. If you wish to uninstall completely, you will need to delete these files manually.

    sudo rm -r /var/lib/jenkins
    sudo rm -r /var/cache/jenkins
    sudo rm -r /var/log/jenkins
    

Note that you may need to have administrator (root) privileges or sudo privileges before performing the steps above.

After completing the above steps, Jenkins should have been completely uninstalled.

Hope this helps to completely uninstall Jenkins installed via deb package! If you have additional questions, please feel free to ask.

 

Guess you like

Origin blog.csdn.net/Holenxr/article/details/131841909