How to remove unused snap apps (automatically)

When listing snap apps you see ton of application that should be deleted but unlike flatpacks, snaps don’t have an option uninstall --unused at least I’m not aware of such option.

Name                                  Version                         Rev    Tracking         Publisher   Notes
bare                                  1.0                             5      latest/stable    canonical✓  base
converseen                            0.15.0.3                        45     latest/stable    faster3ck   -
converseen                            0.15.0.3                        44     latest/stable    faster3ck   disabled
core                                  16-2.61.4-20250508              17212  latest/stable    canonical✓  core,disabled
core                                  16-2.61.4-20250626              17247  latest/stable    canonical✓  core
core18                                20250822                        2947   latest/stable    canonical✓  base,disabled
core18                                20250910                        2952   latest/stable    canonical✓  base
core20                                20250730                        2669   latest/stable    canonical✓  base
core20                                20250526                        2599   latest/stable    canonical✓  base,disabled
core22                                20250730                        2111   latest/stable    canonical✓  base,disabled
core22                                20250822                        2133   latest/stable    canonical✓  base
core24                                20250829                        1196   latest/stable    canonical✓  base
core24                                20250729                        1151   latest/stable    canonical✓  base,disabled
desktop-security-center               0+git.d2e7fd4                   87     1/stable/…       canonical✓  -
desktop-security-center               0+git.f7ad73a                   59     1/stable/…       canonical✓  disabled
firmware-updater                      0+git.7983059                   147    1/stable/…       canonical✓  disabled
firmware-updater                      0+git.22198be                   167    1/stable/…       canonical✓  -
gnome-3-28-1804                       3.28.0-19-g98f9e67.98f9e67      198    latest/stable    canonical✓  -
gnome-3-38-2004                       0+git.efb213a                   143    latest/stable    canonical✓  -
gnome-42-2204                         0+git.38ea591                   202    latest/stable/…  canonical✓  disabled
gnome-42-2204                         0+git.837775c-sdk0+git.7b07595  226    latest/stable/…  canonical✓  -
gnome-46-2404                         0+git.4ca00c0-sdk0+git.df43897  125    latest/stable/…  canonical✓  -
gnome-46-2404                         0+git.4ca00c0-sdk0+git.1ecbaa5  121    latest/stable/…  canonical✓  disabled
gtk-common-themes                     0.1-92-g83a94a1                 1536   latest/stable/…  canonical✓  disabled
gtk-common-themes                     0.1-81-g442e511                 1535   latest/stable/…  canonical✓  -
gtk2-common-themes                    0.1                             13     latest/stable    canonical✓  -
kde-frameworks-5-99-qt-5-15-7-core20  5.99.0                          7      latest/stable    kde✓        -
kf5-5-111-qt-5-15-11-core22           5.111                           7      latest/stable    kde✓        -
kf6-core22                            6.6.0                           42     latest/stable    kde✓        disabled
kf6-core22                            6.10.0                          43     latest/stable    kde✓        -
kf6-core24                            6.9.1-6.14.0-6.3.5-25.04.2      34     latest/stable    kde✓        -
kf6-core24                            6.9.1-6.14.0-6.3.5-25.04.2      33     latest/stable    kde✓        disabled
mesa-2404                             25.0.7-snap207                  1110   latest/stable    canonical✓  disabled
mesa-2404                             24.2.8-snap185                  912    latest/stable    canonical✓  -
mesa-core22                           23.2.1                          498    latest/stable    canonical✓  -
mesa-core22                           23.2.1                          478    latest/stable    canonical✓  disabled
prompting-client                      0+git.1756bbf                   87     1/stable/…       canonical✓  disabled
prompting-client                      0+git.d542a5d                   104    1/stable/…       canonical✓  -
qt-common-themes                      1.0                             10     latest/stable    kde✓        -
snap-store                            0+git.90575829                  1270   2/stable/…       canonical✓  -
snap-store                            0+git.c8916a07                  1300   2/stable/…       canonical✓  disabled
snapd                                 2.70                            24792  latest/stable    canonical✓  snapd,disabled
snapd                                 2.71                            25202  latest/stable    canonical✓  snapd
snapd-desktop-integration             0.9                             315    latest/stable/…  canonical✓  -
snapd-desktop-integration             0.9                             253    latest/stable/…  canonical✓  disabled
spotify                               1.2.63.394.g126b0d89            88     latest/stable    spotify✓    -
spotify                               1.2.60.564.gcc6305cb            87     latest/stable    spotify✓    disabled

Is there a option to remove unused snap packages ?

1 Like

Yes, you can use my orphaned snaps remover script.

https://github.com/Mylinde/orphand_snaps

1 Like

Please check the documentation here:

Revision package management

The Snap Store caches several older revisions of every snap, as does the local system. By default, 2 revisions are stored locally, while Ubuntu Core systems store 3. These defaults can be changed with the refresh-retain system option.

The extra versions are there in case you need to revert to an earlier one if something is not working correctly.

What you are seeing is perfectly normal.

However for example will a core18 ever get removed in such situation it will most probably never get an update and it never get re used by a software. So will not this just be a junk gathering problem?

Thanks run the script and this is the only software that is left

Name                       Version                         Rev    Tracking         Publisher   Notes
bare                       1.0                             5      latest/stable    canonical✓  base
converseen                 0.15.0.3                        45     latest/stable    faster3ck   -
core                       16-2.61.4-20250626              17247  latest/stable    canonical✓  core
core20                     20250730                        2669   latest/stable    canonical✓  base
core22                     20250822                        2133   latest/stable    canonical✓  base
core24                     20250829                        1196   latest/stable    canonical✓  base
desktop-security-center    0+git.d2e7fd4                   87     1/stable/…       canonical✓  -
firmware-updater           0+git.22198be                   167    1/stable/…       canonical✓  -
gnome-3-38-2004            0+git.efb213a                   143    latest/stable    canonical✓  -
gnome-42-2204              0+git.837775c-sdk0+git.7b07595  226    latest/stable/…  canonical✓  -
gtk-common-themes          0.1-81-g442e511                 1535   latest/stable/…  canonical✓  -
gtk2-common-themes         0.1                             13     latest/stable    canonical✓  -
kf6-core22                 6.10.0                          43     latest/stable    kde✓        -
kf6-core24                 6.9.1-6.14.0-6.3.5-25.04.2      34     latest/stable    kde✓        -
mesa-2404                  24.2.8-snap185                  912    latest/stable    canonical✓  -
prompting-client           0+git.d542a5d                   104    1/stable/…       canonical✓  -
qt-common-themes           1.0                             10     latest/stable    kde✓        -
snap-store                 0+git.90575829                  1270   2/stable/…       canonical✓  -
snapd                      2.71                            25202  latest/stable    canonical✓  snapd
snapd-desktop-integration  0.9                             315    latest/stable/…  canonical✓  -
spotify                    1.2.63.394.g126b0d89            88     latest/stable    spotify✓    -

Hopefully canonical will add this feature to snaps and people will no longer need to rely on third party scripts

There have been several discussions around such a feature on forum.snapcraft.io before (and a few bugs filed, below is one)…

2 Likes

No, I’ve just seen those support snaps accumulate over the years if you don’t do fresh installs. You can remove them easily with the terminal “sudo snap remove” command; if they are still needed, you will not be allowed to remove them.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.