command to clean apache-karaf cache
Solution 1
When you start karaf from the command line, use the clean
command.
i.e.
~/home/karaf/bin: ./karaf clean
See https://karaf.apache.org/manual/latest/users-guide/start-stop.html#Cleanstart for more detail.
There is no way to do it from within Karaf - it wouldn't make sense for the reason Christian Schneider describes above.
Solution 2
The cache holds the state of the OSGi framework. It can not be cleaned while karaf is running.
You can use shutdown -cc
to restart and clean the cache.
Shriram
Updated on June 17, 2022Comments
-
Shriram about 2 years
Is there any command to clean the karaf container? ie) I am trying to create a bundle and installing the bundle multiple times in apache-karaf-2.3.10. After certain number of tries karaf is not performing as expected. Sometimes names are not appearing instead absolute path of the bundle appears. So i am expecting a karaf shell command to clean the data cache folder so that karaf goes back to original state(kind of factory reset).