Tuesday 3 July 2018

Jenkins how to clear cache

In this article we will see how to clear cache for Jenkins


While deploying new installation or driver, there is a need to clear cache for Jenkins. Even though Jenkins is removed, the previous installation details (as cache) can cause issue to the new installation. The solution lies in clearing the cache.

Background & Solution:

To understand this, first find out which all paths / locations where jenkins will be installed.

[root@server1 install]# rpm -ql jenkins
/usr/sbin/rcjenkins /var/cache/jenkins

So, as you can see these are the above paths / locations where jenkins will be installed. Any jenkins cache files, which remains in these paths might cause trouble to the new installation. So as a solution to this problem, we need to remove all files from these paths:

Here are the steps / commands to clear cache:

[root@server1 install]# rm -rf /var/cache/jenkins/*
[root@server1 install]# rm -rf  /var/lib/jenkins/*
[root@server1 install]# rm -rf /var/log/jenkins/*

After these paths / locations are cleared, we can go ahead with a new installation with no previous cache.

That's all about steps to clear cache for Jenkins. If you have queries, please write in comment section. Thanks.

No comments:

Post a Comment