Pages

Saturday, December 26, 2015

Clean Jenkins Cache

There are cases where we need to clear the Cache for jenkins when deploying a new installation. Though we remove the jenkins there are cases where previous installation details will be available that can cause issues while installation.

Here are the major locations where jenkins files will be installed

[root@vx111a Downloads]# rpm -ql jenkins
/etc/init.d/jenkins
/etc/logrotate.d/jenkins
/etc/sysconfig/jenkins
/usr/lib/jenkins
/usr/lib/jenkins/jenkins.war
/usr/sbin/rcjenkins
/var/cache/jenkins
/var/lib/jenkins
/var/log/jenkins

In order to remove the cache we need remove the following,

rm -rf /var/cache/jenkins/*
rm -rf  /var/lib/jenkins/*
rm -rf /var/log/jenkins/*


Once these locations are cleaned we can now perform a new installation with no previous cache

10 comments :

  1. Removing "/var/lib/jenkins/*" will remove the entirety of the Jenkins configuration and installation.

    Do *NOT* do this unless you want to perform a completely fresh installation.

    ReplyDelete
  2. `rm -rf /var/lib/jenkins/*` is dangerous. Know what you are doing before executing the command

    ReplyDelete
  3. Amazing! Itss truly amazing post, I have got mucһ cear idea on the topic of from this
    poѕt.

    ReplyDelete
  4. Ӏ dеlight in, result in I found just what
    I used to bbe l᧐oking for. Yoou have ended my 4 day long hunt!
    God Bless yyou man. Have a reat day. Bye

    ReplyDelete
  5. Hey there! This іs my first comment heгe so I just wanted to give a quick shout out and sɑy I genuinely enjoy
    reading your articles. Can you suggеst any
    other blogs/websites/forums that go over the samе
    topics? Thank you!

    ReplyDelete
  6. Hello Theгe. I found your bloɡ the սse of msn. That is
    an extremely smartly written article. I'll be suгe to boоkmark it and come back
    to read more of your helpful information. Thank you for the
    post. I wіll certainly comeback.

    ReplyDelete
  7. sudo apt-get remove --purge jenkins
    will it not remove all the configurations of jenkins including the cache please help i am hunting for such a post since 2 days as when i ever install jenkins the previous configuration comes back with it and i want a fresh start of jenkins.

    ReplyDelete
  8. how to free memory space in jenkins i.e how to remove cache files and junk files .

    ReplyDelete
  9. Please update this post to remove rm -rf /var/lib/jenkins/*

    ReplyDelete
    Replies
    1. It's will be remove all jenkins, do not it

      Delete