Fedora-OSTree-Setup-dev / Fedora-OSTree-Setup

Glorified scipt that automates the setup of Fedora Silverblue/Kinoite based on given config file.
GNU General Public License v3.0
7 stars 3 forks source link

Flatpak purge removed files #28

Closed boredsquirrel closed 1 year ago

boredsquirrel commented 1 year ago

its soo annoying, that the Flatpak CLI doesnt remove leftover files.

Here is a bash script offering deletion of Flatpak directories with no corresponding app existing

I think we should add that and create an appstarter for it.

wget https://raw.githubusercontent.com/ChristianSilvermoon/Flatpurge/master/flatpurge -P ~/.scripts

chmod +x  ~/.scripts/*

I cant get an appstarter to open a GUI Terminal and allow interaction.

the command would be ~/.scripts/flatpurge -d

iaacornus commented 1 year ago

doesn't flatpak --delete-data option removes it?

iaacornus commented 1 year ago

from the script it just deletes $HOME/.var/app/flatpakapp which seems to be handled by --delete-data option when called in flatpak uninstall

iaacornus commented 1 year ago

i've reviewed the script, it just seems an implementation of --delete-data:

appdir="$HOME/.var/app"
...
purge_prompt() {
    if [ "${#N[@]}" = "0" ]; then
        echo "You have no left over app directories!"
        return
    fi

    local choice
    for app in ${N[@]}; do

        if [ "$ARG_FORCE" ]; then
            echo -e "\e[31;1mDELETING\e[37;22m residual user data for \e[1m$app\e[22m"
            #rm -rf -- "$appdir/$app"
        else
            echo -en "\e[31;1mDELETE\e[37;22m residual user data for \e[1m$app\e[22m ? (Y/N) "
                read -rsn1 choice
                echo ""
            if [ "${choice,,}" = "y" ]; then
                echo -e "\e[2mRemoving... \e[22m"
                rm -rf -- "$appdir/$app"
            fi
        fi
    done
}
...

so we really don't need it, we can just call flatpak --system --delete-data $appname, i'm closing this one

boredsquirrel commented 1 year ago

ok found out about that too, good