mojira.dev

cappu

Assigned

No issues.

Reported

No issues.

Comments

I have the same issue, but I made a script that starts on login that automatically deletes the webcache2 folder for me after exit:

#!/bin/bash

# Path to the webcache2 folder
WEBCACHE2_DIR="$HOME/.minecraft/webcache2"

echo "Script started"

while true; do
    # Check if the Minecraft Launcher process is running
    if pgrep -f "$HOME/.minecraft/launcher/minecraft-launcher" > /dev/null; then
        echo "Minecraft launcher is running"

        # Wait until Minecraft launcher is no longer running
        while pgrep -f "$HOME/.minecraft/launcher/minecraft-launcher" > /dev/null; do
            sleep 1
        done
        
        echo "Minecraft launcher closed"

        # Delete the webcache2 folder after launcher exits
        rm -rf "$WEBCACHE2_DIR"
        echo "webcache2 folder deleted."
    fi

    # Sleep for a short time before checking again
    sleep 2
done

I have the same issue as well. I was wondering if I could make a script that would delete that folder every time I closed the launcher, which I had ChatGPT write for me. I recommend adding this as a startup script in KDE system settings.

#!/bin/bash

# Path to the webcache2 folder
WEBCACHE2_DIR="$HOME/.minecraft/webcache2"

echo "Script started"

while true; do
    # Check if the Minecraft Launcher process is running
    if pgrep -f "$HOME/.minecraft/launcher/minecraft-launcher" > /dev/null; then
        echo "Minecraft launcher is running"

        # Wait until Minecraft launcher is no longer running
        while pgrep -f "$HOME/.minecraft/launcher/minecraft-launcher" > /dev/null; do
            sleep 1
        done
        
        echo "Minecraft launcher closed"

        # Delete the webcache2 folder after launcher exits
        rm -rf "$WEBCACHE2_DIR"
        echo "webcache2 folder deleted."
    fi

    # Sleep for a short time before checking again
    sleep 2
done