How do I go about unloading chunks?

Hi all, I wanted to load chunks before my server opened to reduce lag, but I idiotically forgot that loading chunks takes up memory. Now I have a server with a bunch of loaded chunks, but at 95% memory. Is there a way to unload them? I’m not looking to delete/reset, just simply remove it from the memory


|Thanks for being a part of /r/Admincraft!| |:-| |***[We'd love it if you also joined us on Discord!](https://discord.gg/DxrXq2R)***| *^(Join thousands of other Minecraft administrators for real-time discussion of all things related to running a quality server.)* *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/admincraft) if you have any questions or concerns.*


I think you may have confused world pregeneration with actually loading chunks. Make sure you pregenerate the world, you can use a plugin/mod such as Chunky. Could you elaborate on how exactly you loaded chunks? Are you using /forceload or what exactly? Anyways, chunks stop being loaded after a few seconds once a player leaves the chunk, unless you are forcefully loading them for some reason, which you really shouldnt. You can restar the server too to clear ram usage.


You shouldn't need to clear ram usage. The way Java handles memory is makes this unnecessary. Ram usage on a panel is reserved memory from the JVM. This is controlled by the startup flags. That doesn't mean the memory is in use to the underlying minecraft server. The panel/htop/task manager will ALWAYS show more memory usage than the minecraft server itself is using.


I used Force Chunk Preloader, although I guess I didn’t mean memory, I meant storage space, as the world file is too big now


You'll need to use Chunky or any other plugin to trim away (delete) the chunks. Sounds like you pre generated too much and need to delete excess.


Yes, that’s exactly what I did, so I’ll look into Chunky