Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--unused doesn't remove old NVidia runtime versions #2718

Open
ajzone opened this issue Feb 23, 2019 · 49 comments
Open

--unused doesn't remove old NVidia runtime versions #2718

ajzone opened this issue Feb 23, 2019 · 49 comments
Labels

Comments

@ajzone
Copy link

ajzone commented Feb 23, 2019

Linux distribution and version

Fedora 29

Flatpak version

flatpak-1.2.3-2.fc29.x86_64
flatpak-libs-1.2.3-2.fc29.x86_64

Description of the problem

I have a NVidia card and currently there are 7 NVidia runtimes for each arch, 14, in total installed:

$ flatpak list | grep -i nvidia
nvidia-390-59	org.freedesktop.Platform.GL.nvidia-390-59		1.4	x86_64	flathub	user
nvidia-396-45	org.freedesktop.Platform.GL.nvidia-396-45		1.4	x86_64	flathub	user
nvidia-396-54	org.freedesktop.Platform.GL.nvidia-396-54		1.4	x86_64	flathub	user
nvidia-410-73	org.freedesktop.Platform.GL.nvidia-410-73		1.4	x86_64	flathub	user
nvidia-410-78	org.freedesktop.Platform.GL.nvidia-410-78		1.4	x86_64	flathub	user
nvidia-415-25	org.freedesktop.Platform.GL.nvidia-415-25		1.4	x86_64	flathub	user
nvidia-415-27	org.freedesktop.Platform.GL.nvidia-415-27		1.4	x86_64	flathub	user
nvidia-390-59	org.freedesktop.Platform.GL32.nvidia-390-59		1.4	x86_64	flathub	user
nvidia-396-45	org.freedesktop.Platform.GL32.nvidia-396-45		1.4	x86_64	flathub	user
nvidia-396-54	org.freedesktop.Platform.GL32.nvidia-396-54		1.4	x86_64	flathub	user
nvidia-410-73	org.freedesktop.Platform.GL32.nvidia-410-73		1.4	x86_64	flathub	user
nvidia-410-78	org.freedesktop.Platform.GL32.nvidia-410-78		1.4	x86_64	flathub	user
nvidia-415-25	org.freedesktop.Platform.GL32.nvidia-415-25		1.4	x86_64	flathub	user
nvidia-415-27	org.freedesktop.Platform.GL32.nvidia-415-27		1.4	x86_64	flathub	user

Doing a 'flatpak remove --unused' returns "

$ flatpak remove --unused
Nothing unused to uninstall

Steps to reproduce

Have an NVidia card and older NVidia driver.
Install a Flatpak that needs NVidia runtime.
Update NVidia driver to a newer version.
Flatpak will update the NVidia runtime, but won't remove the old one.
Run 'flatpak remove --unused' and you'll get the message.

@ghost
Copy link

ghost commented Mar 10, 2019

Realizing this is closed, I'll reference an edit on a recent issue I opened here:
#2751 (comment)

@BailShamber
Copy link

BailShamber commented Nov 27, 2020

It happens on fedora 33 (Silverblue) as well.
flatpak version 1.8.3

running flatpak remove --unused doesn't remove older versions of "org.kde.PlatformTheme.QGnomePlatform"
When removing the older versions manually, flatpak doesn't complain about them being needed by another package.
Screenshot from 2020-11-27 09-28-38
Screenshot from 2020-11-27 09-28-10

@BailShamber
Copy link

BailShamber commented Nov 27, 2020

Just did a flatpak update and it reinstalled the old versions that I have just removed, so actually, the problem is probably flatpak not complaining about removing needed deps rather than what I suspected, at least in my case.

$flatpak update -y
Looking for updates…
Info: org.kde.PlatformTheme.QGnomePlatform.Sources is end-of-life, with reason: The KDE 5.11 runtime is no longer supported and does not receive security updates. We strongly recommend migrating to a supported runtime.
Info: org.kde.Platform is end-of-life, with reason: The KDE 5.11 runtime is no longer supported and does not receive security updates. We strongly recommend migrating to a supported runtime.
Info: org.kde.Platform.Locale is end-of-life, with reason: The KDE 5.11 runtime is no longer supported and does not receive security updates. We strongly recommend migrating to a supported runtime.
Info: org.freedesktop.Platform.ffmpeg is end-of-life, with reason: The Freedesktop 1.6 runtime is no longer supported and does not receive security updates. Please ask your application developer to migrate to a supported runtime.
Info: org.freedesktop.Platform.VAAPI.Intel is end-of-life, with reason: The Freedesktop 1.6 runtime is no longer supported and does not receive security updates. Please ask your application developer to migrate to a supported runtime.
Info: org.kde.PlatformTheme.QGnomePlatform is end-of-life, with reason: The KDE 5.11 runtime is no longer supported and does not receive security updates. We strongly recommend migrating to a supported runtime.


        ID                                   Branch Op Remote  Download
 1. [✓] org.kde.PlatformTheme.QGnomePlatform 5.11   i  flathub 100.0 kB / 124.1 kB
 2. [✓] org.kde.PlatformTheme.QGnomePlatform 5.14   i  flathub 112.9 kB / 144.9 kB`

@vpodzime
Copy link

Hard to say what it a worse bug.

@hydrosIII
Copy link

Same here, Opensuse Leap 15.2

@hsantos92
Copy link

same here, POP! OS 20.10

@cezarmezzalira
Copy link

Hey guys!
I'm using Pop! OS 20.04 and I have the same issue.
But, I removed the old packages, one by one, using the command flatpak uninstall name-of-package.
For example, to uninstall version org.freedesktop.Platform.GL.nvidia-460-56, I ran:
flatpak uninstall org.freedesktop.Platform.GL.nvidia-460-56

Gave me a little work, but everyting is going well here.

I think it's not a bug, however a default behavior, because maintain the old packages if something is going wrong after an update.
Good Luck!

@bvibber
Copy link

bvibber commented Apr 3, 2021

It is definitely a bug, because it uses gigabytes of disk space for useless packages that could've been reinstalled if you for some reason wanted to.

@cezarmezzalira
Copy link

Hey Brion, don't get me wrong.
I understand your point, and checking the issues #2917 and #3711, there's a lot of discussion about maintain or not this packages on system, and why not delete them automatically.

I just want to share my person experience, because in some cases maybe works.
Would you tried the command flatpak uninstall --unused latelly?
I did this here, and the old nvidia packages are removed from my system.
I'm using POP! OS 20.04
Maybe, like I said, me and everyone here wants a trigger, to uninstall the old packages automacally.
This packages occupies a lot of space in my PC too, but I only try to help others like me posting the first comment.
Peace!

@bvibber
Copy link

bvibber commented Apr 5, 2021

Hey Brion, don't get me wrong.
I understand your point, and checking the issues #2917 and #3711, there's a lot of discussion about maintain or not this packages on system, and why not delete them automatically.

I just want to share my person experience, because in some cases maybe works.
Would you tried the command flatpak uninstall --unused latelly?
I did this here, and the old nvidia packages are removed from my system.
I'm using POP! OS 20.04
Maybe, like I said, me and everyone here wants a trigger, to uninstall the old packages automacally.
This packages occupies a lot of space in my PC too, but I only try to help others like me posting the first comment.
Peace!

Are you telling me the bug has been fixed? Which commit in flatpak fixed it?

@bvibber
Copy link

bvibber commented Apr 5, 2021

The reason I ask is that the command you give is listed as not working in the title of this issue. So if it's fixed, then something changed.

@ricvelozo
Copy link

ricvelozo commented Apr 6, 2021

This issue seems fixed for me in Flatpak 1.10.2 / Fedora 33, I don't know since when.

But the old runtimes are not removed automatically when updating. Maybe we should open a new issue for this.

@bvibber
Copy link

bvibber commented Apr 6, 2021

Sweet, I'll test it out when I get a chance.

@gorghino
Copy link

On Pop_OS! 20.10 I uninstalled the unused old nvidia drivers with --unused:

gorgo@pop-os:~$ flatpak uninstall --unused


        ID                                                                       Branch              Op
 1. [-] org.freedesktop.Platform.GL.default                                      19.08               r
 2. [-] org.freedesktop.Platform.GL.nvidia-455-38                                1.4                 r
 3. [-] org.freedesktop.Platform.GL.nvidia-460-27-04                             1.4                 r
 4. [-] org.freedesktop.Platform.GL.nvidia-460-32-03                             1.4                 r
 5. [-] org.freedesktop.Platform.GL.nvidia-460-39                                1.4                 r
 6. [-] org.freedesktop.Platform.GL.nvidia-460-56                                1.4                 r
 7. [-] org.freedesktop.Platform.GL.nvidia-460-67                                1.4                 r
 8. [-] org.freedesktop.Platform.GL.nvidia-465-24-02                             1.4                 r
 9. [-] org.freedesktop.Platform.VAAPI.Intel                                     19.08               r
10. [-] org.freedesktop.Sdk.Extension.openjdk11                                  18.08               r
11. [-] org.gnome.Platform                                                       3.36                r
12. [-] org.gnome.Platform.Locale                                                3.36                r
13. [-] org.kde.Platform                                                         5.15                r
14. [-] org.kde.Platform.Locale                                                  5.15                r
15. [-] org.kde.PlatformTheme.QGnomePlatform.Sources                             5.15                r
16. [-] org.kde.PlatformTheme.QGnomePlatform                                     5.15                r
17. [-] org.kde.PlatformTheme.QtSNI.Sources                                      5.15                r
18. [-] org.kde.PlatformTheme.QtSNI                                              5.15                r
19. [-] org.kde.WaylandDecoration.QGnomePlatform-decoration                      5.15                r
20. [-] org.kde.WaylandDecoration.QGnomePlatform_decoration.Sources              5.15                r

@vpodzime
Copy link

On Pop_OS! 20.10 I uninstalled the unused old nvidia drivers with --unused:

Could you please check that flatpak update afterwards doesn't bring many of those back? Because that has been the case for me on Fedora.

@gorghino
Copy link

I got

gorgo@pop-os:~$ flatpak update 
Looking for updates…


        ID                                                       Branch             Op            Remote             Download
 1. [/] org.freedesktop.Platform.GL.nvidia-460-73-01             1.4                u             flathub            133,3 MB / 133,7 MB

Updating… ████████████████████ 100%  66,6 MB/s

that is the driver I'm currently using.

@ranisalt
Copy link

ranisalt commented Jul 1, 2021

I have this issue but only for the 32 bit version of the drivers. After updating both 64 and 32 bit versions from 465 to 470, running remove --unused only removes the older 64 bit version, the 32 bit version stays.

@simonsjw
Copy link

flatpak uninstall --unused appears to be working for me (pop os 21.04).
flatpak update doesn't return anything previously unused and removed.

sjw@pop-os   anaconda3  ~   4m 22s   2.23   11.48G RAM
❯ flatpak uninstall --unused

    ID                                                      Branch           Op
  1. [-] org.freedesktop.Platform.GL.nvidia-460-56 1.4 r
  2. [-] org.freedesktop.Platform.GL.nvidia-460-67 1.4 r
  3. [-] org.freedesktop.Platform.GL.nvidia-460-73-01 1.4 r
  4. [-] org.gnome.Platform 3.38 r
  5. [-] org.gnome.Platform.Locale 3.38 r

Uninstall complete.

sjw@pop-os   anaconda3  ~   14.0390s   1.88   11.32G RAM

sjw@pop-os   anaconda3  ~   INT ✘  1.42   11.2G RAM
❯ flatpak uninstall --unused
Nothing unused to uninstall

sjw@pop-os   anaconda3  ~   0.78   10.06G RAM
❯ flatpak update
Looking for updates…
Nothing to do.

@awerlang
Copy link

I have this issue but only for the 32 bit version of the drivers. After updating both 64 and 32 bit versions from 465 to 470, running remove --unused only removes the older 64 bit version, the 32 bit version stays.

This.

How to see if the issue persist

  1. Verify if any older nvidia versions are installed

$ flatpak list | grep -i nvidia

If this step only returns current nvidia versions, there's nothing to be proved here, please stop here and avoid adding noise in this thread.

  1. Execute the command expected to remove older nvidia versions

$ flatpak remove --unused

  1. Then check if older versions are still installed (repeats step 1).

$ flatpak list | grep -i nvidia

Listing the installed applications is the only way. If this lists older nvidia (be it GL or GL32 versions) then the issue persists, upvote comment at the top.

If step 1 returns older versions and at step 3 they're gone, then this it's new information. It might be helpful to collect your system information (distro, etc) as a comment here.

@tomgar
Copy link

tomgar commented Jul 22, 2021

@awerlang I can definitely confirm what @ranisalt says

% flatpak remove --unused
Nothing unused to uninstall

% flatpak uninstall --runtime nvidia
Similar installed refs found for ‘nvidia’:

  1. runtime/org.freedesktop.Platform.GL32.nvidia-470-57-02/x86_64/1.4 (system)
  2. runtime/org.freedesktop.Platform.GL.nvidia-470-57-02/x86_64/1.4 (system)
  3. runtime/org.freedesktop.Platform.GL32.nvidia-465-31/x86_64/1.4 (system)
  4. All of the above

Which do you want to use (0 to abort)? [0-4]:

I'd certainly hope that "runtime/org.freedesktop.Platform.GL32.nvidia-465-31/x86_64/1.4" would be gone from my system after doing a "remove --unused" command.

Distro is Archlinux & Flatpak version is 1.11.2

@wokawoka
Copy link

wokawoka commented Jan 12, 2022

I'm running pop os 21.04 on a laptop and I'm experiencing the same problem.
Sometimes I have to wait for about 10 versions of the nvidia driver to update, not to mention the wasted space on the ssd.

$  flatpak list | grep -i nvidia
nvidia-440-44	org.freedesktop.Platform.GL.nvidia-440-44		1.4	flathub	system
nvidia-440-82	org.freedesktop.Platform.GL.nvidia-440-82		1.4	flathub	system
nvidia-455-28	org.freedesktop.Platform.GL.nvidia-455-28		1.4	flathub	system
nvidia-455-38	org.freedesktop.Platform.GL.nvidia-455-38		1.4	flathub	system
nvidia-460-56	org.freedesktop.Platform.GL.nvidia-460-56		1.4	flathub	system
nvidia-460-67	org.freedesktop.Platform.GL.nvidia-460-67		1.4	flathub	system
nvidia-460-73-01	org.freedesktop.Platform.GL.nvidia-460-73-01		1.4	flathub	system
nvidia-465-31	org.freedesktop.Platform.GL.nvidia-465-31		1.4	flathub	system
nvidia-470-86	org.freedesktop.Platform.GL.nvidia-470-86		1.4	flathub	system
nvidia-470-86	org.freedesktop.Platform.GL.nvidia-470-86		1.4	flathub	user

$ flatpak remove --unused
Nothing unused to uninstall

Any idea? Thank you!

@wokawoka
Copy link

I'm running pop os 21.04 on a laptop and I'm experiencing the same problem. Sometimes I have to wait for about 10 versions of the nvidia driver to update, not to mention the wasted space on the ssd.

$  flatpak list | grep -i nvidia
nvidia-440-44	org.freedesktop.Platform.GL.nvidia-440-44		1.4	flathub	system
nvidia-440-82	org.freedesktop.Platform.GL.nvidia-440-82		1.4	flathub	system
nvidia-455-28	org.freedesktop.Platform.GL.nvidia-455-28		1.4	flathub	system
nvidia-455-38	org.freedesktop.Platform.GL.nvidia-455-38		1.4	flathub	system
nvidia-460-56	org.freedesktop.Platform.GL.nvidia-460-56		1.4	flathub	system
nvidia-460-67	org.freedesktop.Platform.GL.nvidia-460-67		1.4	flathub	system
nvidia-460-73-01	org.freedesktop.Platform.GL.nvidia-460-73-01		1.4	flathub	system
nvidia-465-31	org.freedesktop.Platform.GL.nvidia-465-31		1.4	flathub	system
nvidia-470-86	org.freedesktop.Platform.GL.nvidia-470-86		1.4	flathub	system
nvidia-470-86	org.freedesktop.Platform.GL.nvidia-470-86		1.4	flathub	user

$ flatpak remove --unused
Nothing unused to uninstall

Any idea? Thank you!

No one with advice on this?

@shazow
Copy link

shazow commented Mar 26, 2022

Kinda silly but here's a short script I'm using right now to find the latest version and uninstall all of the others:

FLATPAK_LATEST_NVIDIA=$(flatpak list | grep "GL.nvidia" | cut -f2 | cut -d '.' -f5)
flatpak list | grep org.freedesktop.Platform.GL32.nvidia- | cut -f2 | grep -v "$FLATPAK_LATEST_NVIDIA" | xargs -o flatpak uninstall

@wokawoka
Copy link

wokawoka commented Mar 27, 2022

flatpak list | grep org.freedesktop.Platform.GL32.nvidia- | cut -f2 | grep -v "$FLATPAK_LATEST_NVIDIA" | xargs -o flatpak uninstall

thank you for your script, it looks it doesn't work on my system though, I just get
error: Must specify at least one REF, --unused, --all or --delete-data
I can't understand if it's complaining that a flag is missing from the uninstall command

@shazow
Copy link

shazow commented Mar 27, 2022

@wokawoka You need both lines (you quoted just one), and it only does anything if there are outdated versions. Otherwise there's nothing to uninstall and it will complain. :) Feel free to expand it to be more user-friendly!

@carlos-mg89
Copy link

flatpak uninstall --unused works as expected in my Ubuntu 21.10. Finally all those annoying Nvidia packages for old Nvidia drivers are gone!

@mwleeds
Copy link
Collaborator

mwleeds commented Mar 31, 2022

Probably Flatpak should just remove the unused extensions for you during flatpak update. Currently it only removes unused runtimes if they're marked EOL, because otherwise we risk removing something that would later have to be re-downloaded, but that shouldn't be a concern for runtime extensions since they're typically small.

@tomgar
Copy link

tomgar commented Apr 3, 2022

@carlos-mg89 main Nvidia runtime (GL) is removed, GL32 version is not. For example as of now I have this:

% flatpak uninstall --runtime nvidia
Similar installed refs found for ‘nvidia’:

   1) runtime/org.freedesktop.Platform.GL32.nvidia-510-60-02/x86_64/1.4 (system)
   2) runtime/org.freedesktop.Platform.GL32.nvidia-510-54/x86_64/1.4 (system)
   3) runtime/org.freedesktop.Platform.GL.nvidia-510-60-02/x86_64/1.4 (system)
   4) All of the above

Which do you want to use (0 to abort)? [0-4]:

, with Flatpak 1.12.7 & ArchLinux

@ralacerda
Copy link

ralacerda commented Sep 21, 2022

Hello everyone,

I was facing the same problem. GL32 versions were not being removed after flatpak uninstall --unused.
While trying to individually remove them, I got the following:

❯ flatpak uninstall org.freedesktop.Platform.GL32.nvidia-515-48-07
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-515-48-07 branch 1.4:
   com.heroicgameslauncher.hgl
Really remove? [y/n]: n

Heroic Game Launcher was using all 4 versions of the nvidia-gl32. After removing Heroic Launcher, flatpak uninstall --unused worked as expected:

❯ flatpak uninstall --unused                                      

These runtimes in installation 'system' are pinned and won't be removed; see flatpak-pin(1):
  runtime/org.gtk.Gtk3theme.Qogir-dark/x86_64/3.22

ID                                                        Branch            Op
 1. [-] org.freedesktop.Platform.Compat.i386                      22.08             r
 2. [-] org.freedesktop.Platform.GL32.default                     22.08             r
 3. [-] org.freedesktop.Platform.GL32.nvidia-515-43-04            1.4               r
 4. [-] org.freedesktop.Platform.GL32.nvidia-515-48-07            1.4               r
 5. [-] org.freedesktop.Platform.GL32.nvidia-515-57               1.4               r
 6. [-] org.freedesktop.Platform.GL32.nvidia-515-65-01            1.4               r

Uninstall complete.

I'm not sure if this is a misbehavior from Heroic Launcher or the intended use (since games might need different versions of the nvidia driver), but anyway, it might be worth to check if any application is not using multiple versions.

I can also confirm that running flatpak update does not bring those nvidia packages back.

@tomgar
Copy link

tomgar commented Sep 24, 2022

You're right @ralacerda. In my case it's Steam the one holding hostage the old nvidia GL32 runtimes. I checked the Steam package here: https://github.com/flathub/com.valvesoftware.Steam , no mention at all of Nvidia. It looks like this is coming from the org.freedesktop.Platform.GL32 extension directly.

I don't know what's the solution here.

@Leopard1907
Copy link

Leopard1907 commented Oct 13, 2022

@ralacerda Not Heroic specific, i had the same with OBS Flatpak. When trying to remove unused it warned me that 515.57 (i'm on 520 driver now ) is in use by OBS but i still removed it anyway, it still worked fine without it. So i would say it is not an app side issue but rather Flatpak keeping refs or something similar to apps and acting like if those versions are vital and has to be kept there.

@LeSnake04
Copy link

Whenever I try to uninstall old NVIDIA versions, this removes MANY packages.

flatpak uninstall nvidia-515-65-01
Similar installed refs found for ‘nvidia-515-65-01’:

   1) runtime/org.freedesktop.Platform.GL32.nvidia-515-65-01/x86_64/1.4 (user)
   2) runtime/org.freedesktop.Platform.GL.nvidia-515-65-01/x86_64/1.4 (user)
   3) All of the above

Which do you want to use (0 to abort)? [0-3]: 3
Info: applications using the extension org.freedesktop.Platform.GL.nvidia-515-65-01 branch 1.4:
   org.supertux.SuperTux-Milestone1, com.atlauncher.ATLauncher, com.github.libresprite.LibreSprite, com.github.z.Cumulonimbus, com.orama_interactive.Pixelorama, io.freetubeapp.FreeTube, io.github.ferraridamiano.ConverterNOW, io.github.prateekmedia.appimagepool, org.gna.Warmux, org.processing.processingide, org.wezfurlong.wezterm, org.widelands.Widelands, rest.insomnia.Insomnia, app.xemu.xemu, com.bitwarden.desktop, com.corsixth.corsixth, com.discordapp.Discord, com.etlegacy.ETLegacy, com.github.iortcw.iortcw, com.github.mtkennerly.ludusavi, com.github.phase1geo.minder, com.heroicgameslauncher.hgl, com.jgraph.drawio.desktop, com.moddb.TotalChaos, com.shatteredpixel.shatteredpixeldungeon, com.viewizard.AstroMenace, io.github.arunsivaramanneo.GPUViewer, io.github.ezQuake, io.github.freedoom.Phase1, io.github.philipk.boilr, md.obsidian.Obsidian, net.minetest.Minetest, net.redeclipse.RedEclipse, net.veloren.airshipper, network.loki.Session, org.armagetronad.ArmagetronAdvanced, org.ferdium.Ferdium, org.freedesktop.appstream-glib, org.geogebra.GeoGebra, org.neverball.Neverball, org.onlyoffice.desktopeditors, org.openttd.OpenTTD, org.signal.Signal, org.supertuxproject.SuperTux, org.zdoom.GZDoom, sh.ppy.osu, io.gdevs.GDLauncher, org.flathub.flatpak-external-data-checker, com.belmoussaoui.Obfuscate, com.github.KRTirtho.Spotube, com.github.jkotra.eovpn, com.github.qarmin.czkawka, com.gitlab.cunidev.Workflow, com.leinardi.gwe, in.cinny.Cinny, io.gitlab.caveman250.headlines, org.gabmus.giara, org.gnome.Rhythmbox3, org.gpodder.gpodder, re.sonny.Tangram, app.drey.Dialect, com.github.GradienceTeam.Gradience, com.github.tchx84.Flatseal, com.github.xournalpp.xournalpp, com.usebottles.bottles, fr.romainvigier.MetadataCleaner, net.lutris.Lutris, org.gnome.Boxes, org.gnome.Evolution, org.gnome.Maps, org.gnome.gitlab.YaLTeR.Identity, org.pipewire.Helvum, com.gitlab.librebob.Athenaeum, com.github.Murmele.Gittyup, io.github.congard.qnvsm, org.kde.kasts, org.olivevideoeditor.Olive, com.virustotal.VirusTotalUploader, org.getmonero.Monero, org.prismlauncher.PrismLauncher, com.obsproject.Studio, org.rncbc.qpwgraph, de.bund.ausweisapp.ausweisapp2, net.davidotek.pupgui2
Really remove? [y/n]:

@jkemp814
Copy link

jkemp814 commented Jan 26, 2023

https://ask.fedoraproject.org/t/remove-old-flatpak-nvidia-drivers/31143/28


 1. [✓] fr.handbrake.ghb.Locale                                    stable             u              flathub                3.8 kB / 534.2 kB
 2. [✓] org.freedesktop.Platform.GL.nvidia-520-56-06               1.4                u              flathub              406.2 MB / 407.0 MB
 3. [✓] org.freedesktop.Platform.GL.nvidia-525-60-11               1.4                u              flathub              413.9 MB / 414.7 MB
 4. [✓] org.freedesktop.Platform.GL.nvidia-525-78-01               1.4                u              flathub              414.0 MB / 414.8 MB
 5. [✓] org.freedesktop.Platform.GL32.nvidia-495-44                1.4                u              flathub              282.3 MB / 283.0 MB
 6. [✓] org.freedesktop.Platform.GL32.nvidia-495-46                1.4                u              flathub              280.9 MB / 281.6 MB
 7. [/] org.freedesktop.Platform.GL32.nvidia-510-47-03             1.4                u              flathub              328.8 MB / 329.6 MB
 8. [ ] org.freedesktop.Platform.GL32.nvidia-510-60-02             1.4                u              flathub            < 329.0 MB
 9. [ ] org.freedesktop.Platform.GL32.nvidia-510-68-02             1.4                u              flathub            < 330.0 MB
10. [ ] org.freedesktop.Platform.GL32.nvidia-515-57                1.4                u              flathub            < 364.1 MB
11. [ ] org.freedesktop.Platform.GL32.nvidia-515-65-01             1.4                u              flathub            < 364.9 MB
12. [ ] org.freedesktop.Platform.GL32.nvidia-515-76                1.4                u              flathub            < 365.6 MB
13. [ ] org.freedesktop.Platform.GL32.nvidia-520-56-06             1.4                u              flathub            < 406.9 MB
14. [ ] org.freedesktop.Platform.GL32.nvidia-525-60-11             1.4                u              flathub            < 414.6 MB
15. [ ] org.freedesktop.Platform.GL32.nvidia-525-78-01             1.4                u              flathub            < 414.8 MB
16. [ ] org.gnome.Calls.Locale                                     stable             u              flathub              < 3.2 MB (partial)
17. [ ] org.gnome.Calls                                            stable             u              flathub             < 11.5 MB
18. [ ] fr.handbrake.ghb                                           stable             u              flathub             < 45.2 MB
19. [ ] com.dropbox.Client                                         stable             u              flathub            < 111.1 MB
20. [ ] us.zoom.Zoom                                               stable             u              flathub            < 168.5 MB
04:11:58 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-495-44
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-495-44 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:12:28 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-495-46
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-495-46 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:12:41 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-510-47-03
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-510-47-03 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:13:07 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-510-68-02
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-510-68-02 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:13:41 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-515-65-01
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-515-65-01 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:14:05 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-515-76
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-515-76 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:14:25 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-520-56-06
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-520-56-06 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:15:08 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-525-60-11
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-525-60-11 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:15:32 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-510-60-02
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-510-60-02 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:16:02 james@HP-Z840 ~ → flatpak uninstall -vv org.freedesktop.Platform.GL32.nvidia-520-56-06
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/james/.local/share/flatpak
Info: applications using the extension org.freedesktop.Platform.GL32.nvidia-520-56-06 branch 1.4:
   com.valvesoftware.Steam
Really remove? [y/n]: n

04:16:47 james@HP-Z840 ~ →

@jkemp814
Copy link

I have uninstalled all those Nvidia flatpak runtimes and performed update, none were reinstalled. Ran flatpak repair, none returned. What makes them stack up like that. Steam is currently using recent Nvidia runtime. That was over 1 GB of runtimes taking up space.

flatpak uninstall --unused removed two GL versions, but all the GL32 would not uninstall using --unused. They had to be manually uninstalled.

I posted an issue report with Valve/Steam.

@luni3359
Copy link

I don't think it's related to valve, I don't have steam installed as a flatpak yet I had to remove all GL32 manually.

@jkemp814
Copy link

I don't think it's related to valve, I don't have steam installed as a flatpak yet I had to remove all GL32 manually.

Did any return? I have read some saying that after an update they all were reinstalled?

@luni3359
Copy link

No, none returned. Here's the command I ran to get rid of them
flatpak uninstall org.freedesktop.Platform.GL32.nvidia-52{0-56-06,5-{60-11,78-01}}

It's unnecessarily messy but it gets rid of the following:

org.freedesktop.Platform.GL32.nvidia-520-56-06
org.freedesktop.Platform.GL32.nvidia-525-60-11
org.freedesktop.Platform.GL32.nvidia-525-78-01

I'd just have done flatpak uninstall org.freedesktop.Platform.GL32.* but it wouldn't let me.

@jkemp814
Copy link

Exactly, I tried that also. I ended up copying the list and added them all on one line. I ended up with 14 of them.

That one-liner is not messy at all. Rather smart to take them all out in one pass.

@ghost
Copy link

ghost commented Feb 3, 2023

Problem still continue on Fedora 37

@LeSnake04
Copy link

LeSnake04 commented Feb 3, 2023

#2718 (comment) Solution: Use --force. The non-nvidia packages don't get uninstalled and nothing broke, at least i didnt notice anything.

Note If this fix doesn't work anymore I cant update the comment since I switched to a RX 6700

@Master811129
Copy link

I have the same issue for years. I just uninstalled those outdated nvidia packages individually and nothing broke. All of those outdated packages warned me that it will break you Steam flatpak client (That's why flatpak remove --unused don't
usually remove them) but after removing them nothing happend.

@ranisalt
Copy link

There seems to be a problem with how dependencies get resolved. The steam package needs any nvidia driver package (ideally the same used by the system), but it triggers the removal warning for every package. The dependency should be resolved to the latest version installed so that old versions get pruned.

@smcv
Copy link
Collaborator

smcv commented Aug 21, 2023

The steam package needs any nvidia driver package (ideally the same used by the system)

No, the requirement is more specific than that. In the NVIDIA proprietary driver, the user-space driver (which Flatpak installs as an extension) and the kernel-side driver (which comes from your OS) must be upgraded in lockstep, so there is only one correct user-space driver to use with your running kernel, and it's the one that matches what it says in /sys/module/nvidia/version. flatpak_get_gl_drivers() has the logic for this.

However, if you might reboot or downgrade into an older kernel with an older kernel-side driver, then your Flatpak apps will need the corresponding older user-space driver instead - so it's not necessarily desirable for Flatpak to be too aggressive about cleaning up older versions.

@smcv
Copy link
Collaborator

smcv commented Aug 21, 2023

Linux distributions that ship the proprietary NVIDIA driver have the option to avoid this whole mess by putting a copy of their proprietary driver in an appropriate location as described in https://blog.tingping.se/2018/08/26/flatpak-host-extensions.html (one of the things on my infinitely long to-do list is to propose this in Debian).

@Ultrabenosaurus
Copy link

Ultrabenosaurus commented Oct 18, 2023

However, if you might reboot or downgrade into an older kernel with an older kernel-side driver, then your Flatpak apps will need the corresponding older user-space driver instead - so it's not necessarily desirable for Flatpak to be too aggressive about cleaning up older versions.

This would make sense if Flatpak behaved like that. The fact so many people complain about having 10+ nvidia runtimes each of GL and GL32 variants accumulate on their system almost certainly doesn't translate to people having 10+ kernel versions and historic kernel-side drivers installed. I know for a fact I've never had more than 3 kernels available to boot into on my system, but as shown in console output in my issue #5261 I had over 20 separate versions of the nvidia runtime which all updated every time any Flatpak program needed an update, and were all flagged as in use by every single Flatpak program I had installed simultaneously.

This is blatantly user-antagonistic behaviour, and the devs have no intention to fix it despite the steady stream of issues on Github and continued complaints throughout. For someone with limited storage space or on a slow or metered Internet connection, this behaviour is very much hostile.

I've now replaced everything I can with non-Flatpak versions because I'm sick of the huge, slow updates and broken, hostile update policy intentionally designed to waste my bandwidth and choke out my drive with unusable, pointless, ancient runtimes just in case I someday reinstall an ancient kernel.

@chrisawi
Copy link
Collaborator

A major contributor to this issue is that the org.freedesktop.Platform.GL32 extension point is defined in each app that uses it, and it's always defined without autoprune-unless = active-gl-driver (because flatpak-builder didn't support it until now).

In brief testing, it appears that this needs to be set by every app that defines the extension point. Would it make sense to add a check to flatpak-builder-lint?

The other half of this issue should be covered by 8c26798, which makes autopruning also happen on update. One remaining quirk is that uninstall --unused still complains that autoprune-able extensions are in use, while update now removes them without any confirmation.

@TingPing
Copy link
Member

Fixed by 8c26798

@TingPing
Copy link
Member

I misread the main issue, in practice it won’t matter because of that commit but they are still considered used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests