Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Flatpak purge removed files #28

Closed
boredsquirrel opened this issue Jan 29, 2023 · 4 comments
Closed

Flatpak purge removed files #28

boredsquirrel opened this issue Jan 29, 2023 · 4 comments
Labels
already implemented doesnt need implementation system wide modification program option that will modify a system wide setting

Comments

@boredsquirrel
Copy link
Collaborator

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 iaacornus added the system wide modification program option that will modify a system wide setting label Jan 29, 2023
@iaacornus
Copy link
Collaborator

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

@iaacornus
Copy link
Collaborator

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
Copy link
Collaborator

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

@iaacornus iaacornus added the already implemented doesnt need implementation label Feb 1, 2023
@boredsquirrel
Copy link
Collaborator Author

ok found out about that too, good

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already implemented doesnt need implementation system wide modification program option that will modify a system wide setting
Projects
None yet
Development

No branches or pull requests

2 participants