• brie@beehaw.org
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      As far as I can tell this seems to be for deleting application data (~/.var/app/*), whereas flatpak uninstall --unused is for uninstalling runtimes that are no longer needed.

    • Efwis@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Because there are distros, like fedora for one, that have flat packs installable by the likes of discovery on KDE that doesn’t require CLI useage for install or uninstall of flatpacks

  • brie@beehaw.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    For fun, a shell script for the same functionality:

    #!/bin/sh
    br="$(printf "\n")" # Obtain a line-break
    
    # If RM_CMD is unset, use trash-cli
    if [ -z ${RM_CMD+y} ]; then RM_CMD="trash"; fi
    
    # List of apps. The leading br is necessary for later pattern matching
    apps="$br$(flatpak list --columns=application)" || exit 1
    
    cd ~/.var/app || exit 1
    
    for app in *; do
    	case "$apps" in
    		*"$br$app$br"*) ;; # Matches if $app is in the list (installed)
    		*)
    			printf 'Removing app data %s\n' "${app}"
    			"$RM_CMD" "./${app}"
    			;;
    	esac
    done
    

    (May eat your files)

  • pkulak@beehaw.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    If you uninstall Steam or Firefox, it can absolutely be gigs, just FYI. Very nice tool to have.

  • rah@feddit.uk
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I just read this as: “Separate program needed to make up for shortcomings of flatpak!” This is to be lamented, not celebrated.

    • brie@beehaw.org
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      This is kind of a shortcoming of all package management in general; should deleting the package delete your user data? There’s an argument to be made that data should be removed with the application, but deleting data irrecoverably as the default isn’t necessarily the easiest approach.

      There’s also another problem, which is that the behaviour of deleting data may make sense for per-user applications, but for system-wide apps, should uninstalling an application start nuking data in people’s homedirs?

    • d3Xt3r@beehaw.orgOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      No, that only deletes the leftover dependencies, it doesn’t delete any app data/config left over.