DbEnv.remove import com.sleepycat.db. Description The DbEnv.remove method destroys a Berkeley DB environment if it is not currently in use. The environment regions, including any backing files, are removed. Any log or database files and the environment directory are not removed. The result of attempting to forcibly destroy the environment when it is in use is unspecified.
Processes using an environment often maintain open file descriptors for shared regions within it.
On UNIX systems, the environment removal will usually succeed, and processes that have already joined the region will continue to run in that region without change. However, processes attempting to join the environment will either fail or create new regions. Calling DbEnv.remove should not be necessary for most applications because the Berkeley DB environment is cleaned up as part of normal database recovery procedures. However, applications may want to call DbEnv.remove as part of application shut down to free up system resources. For example, if the Db.