System keeps older Snap packages












4














So I installed vlc daily built snap package. It's working great, no problems there. However I noticed that after upgrade the system has 2 versions of vlc (7 and 9). That can be seen when browsing /snap/vlc/ directory and using system monitor. This is also the case with other snaps. Is there a way to automatically delete older versions of snaps? Or do I just delete them using plain "rm" command? Is it safe to delete them that way?



Thanks










share|improve this question


















  • 1




    /snap/* is read-only and only is there, (populated) when snaps are mounted so you couldn't remove anything there if you tried. There is a r/w location but I'd stay away. Maybe read here - developer.ubuntu.com/en/snappy/guides/garbage
    – doug
    Jul 26 '16 at 21:15
















4














So I installed vlc daily built snap package. It's working great, no problems there. However I noticed that after upgrade the system has 2 versions of vlc (7 and 9). That can be seen when browsing /snap/vlc/ directory and using system monitor. This is also the case with other snaps. Is there a way to automatically delete older versions of snaps? Or do I just delete them using plain "rm" command? Is it safe to delete them that way?



Thanks










share|improve this question


















  • 1




    /snap/* is read-only and only is there, (populated) when snaps are mounted so you couldn't remove anything there if you tried. There is a r/w location but I'd stay away. Maybe read here - developer.ubuntu.com/en/snappy/guides/garbage
    – doug
    Jul 26 '16 at 21:15














4












4








4







So I installed vlc daily built snap package. It's working great, no problems there. However I noticed that after upgrade the system has 2 versions of vlc (7 and 9). That can be seen when browsing /snap/vlc/ directory and using system monitor. This is also the case with other snaps. Is there a way to automatically delete older versions of snaps? Or do I just delete them using plain "rm" command? Is it safe to delete them that way?



Thanks










share|improve this question













So I installed vlc daily built snap package. It's working great, no problems there. However I noticed that after upgrade the system has 2 versions of vlc (7 and 9). That can be seen when browsing /snap/vlc/ directory and using system monitor. This is also the case with other snaps. Is there a way to automatically delete older versions of snaps? Or do I just delete them using plain "rm" command? Is it safe to delete them that way?



Thanks







package-management snap






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 26 '16 at 19:53









Stanley Mitchell

5112




5112








  • 1




    /snap/* is read-only and only is there, (populated) when snaps are mounted so you couldn't remove anything there if you tried. There is a r/w location but I'd stay away. Maybe read here - developer.ubuntu.com/en/snappy/guides/garbage
    – doug
    Jul 26 '16 at 21:15














  • 1




    /snap/* is read-only and only is there, (populated) when snaps are mounted so you couldn't remove anything there if you tried. There is a r/w location but I'd stay away. Maybe read here - developer.ubuntu.com/en/snappy/guides/garbage
    – doug
    Jul 26 '16 at 21:15








1




1




/snap/* is read-only and only is there, (populated) when snaps are mounted so you couldn't remove anything there if you tried. There is a r/w location but I'd stay away. Maybe read here - developer.ubuntu.com/en/snappy/guides/garbage
– doug
Jul 26 '16 at 21:15




/snap/* is read-only and only is there, (populated) when snaps are mounted so you couldn't remove anything there if you tried. There is a r/w location but I'd stay away. Maybe read here - developer.ubuntu.com/en/snappy/guides/garbage
– doug
Jul 26 '16 at 21:15










3 Answers
3






active

oldest

votes


















2














Answer from doug, somewhat extended:



/snap/* is read-only and snaps are mounted there. The reason for this is that snapd allows you to roll back to an older version of a given snap, that's why it keeps multiple versions. Calling snap remove will remove them all from the system again. There is a r/w location for snaps, but that's unrelated. https://developer.ubuntu.com/en/snappy/guides/garbage needs an update, but it explains the general concept.



Rolling back is done using snap revert:




daniel@daydream:~$ snap revert --help
Usage:
snap [OPTIONS] revert



The revert command reverts the given snap to its state before the
latest refresh. This will reactivate the previous snap revision, and
will use the original data that was associated with that revision,
discarding any data changes that were done by the latest revision. As
an exception, data which the snap explicitly chooses to share across
revisions is not touched by the revert process.



Application Options:
--version print the version and exit



Help Options: -h, --help Show this help message
daniel@daydream:~$







share|improve this answer































    2














    In speaking with Ubuntu developers, the current default is to keep three prior versions of a snap so that you can roll-back to a prior version if needed. This default setting is not configurable.



    You can use the command snap remove --revision=<an old one> snapname to remove an older revision of a snap.



    They are considering whether to have only the current snap mounted as a loop filesystem, but I don't know the status of that.






    share|improve this answer





























      1














      Snapd will automatically retain three revisions (usually current plus two older) by default, and will delete older.



      In mid-2018, snapd was updated so that the number of revisions is configurable (though never less than 2).



      Use the command:



      snap set system refresh.retain=N



      N cannot be less than two.






      share|improve this answer





















        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "89"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f803275%2fsystem-keeps-older-snap-packages%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        2














        Answer from doug, somewhat extended:



        /snap/* is read-only and snaps are mounted there. The reason for this is that snapd allows you to roll back to an older version of a given snap, that's why it keeps multiple versions. Calling snap remove will remove them all from the system again. There is a r/w location for snaps, but that's unrelated. https://developer.ubuntu.com/en/snappy/guides/garbage needs an update, but it explains the general concept.



        Rolling back is done using snap revert:




        daniel@daydream:~$ snap revert --help
        Usage:
        snap [OPTIONS] revert



        The revert command reverts the given snap to its state before the
        latest refresh. This will reactivate the previous snap revision, and
        will use the original data that was associated with that revision,
        discarding any data changes that were done by the latest revision. As
        an exception, data which the snap explicitly chooses to share across
        revisions is not touched by the revert process.



        Application Options:
        --version print the version and exit



        Help Options: -h, --help Show this help message
        daniel@daydream:~$







        share|improve this answer




























          2














          Answer from doug, somewhat extended:



          /snap/* is read-only and snaps are mounted there. The reason for this is that snapd allows you to roll back to an older version of a given snap, that's why it keeps multiple versions. Calling snap remove will remove them all from the system again. There is a r/w location for snaps, but that's unrelated. https://developer.ubuntu.com/en/snappy/guides/garbage needs an update, but it explains the general concept.



          Rolling back is done using snap revert:




          daniel@daydream:~$ snap revert --help
          Usage:
          snap [OPTIONS] revert



          The revert command reverts the given snap to its state before the
          latest refresh. This will reactivate the previous snap revision, and
          will use the original data that was associated with that revision,
          discarding any data changes that were done by the latest revision. As
          an exception, data which the snap explicitly chooses to share across
          revisions is not touched by the revert process.



          Application Options:
          --version print the version and exit



          Help Options: -h, --help Show this help message
          daniel@daydream:~$







          share|improve this answer


























            2












            2








            2






            Answer from doug, somewhat extended:



            /snap/* is read-only and snaps are mounted there. The reason for this is that snapd allows you to roll back to an older version of a given snap, that's why it keeps multiple versions. Calling snap remove will remove them all from the system again. There is a r/w location for snaps, but that's unrelated. https://developer.ubuntu.com/en/snappy/guides/garbage needs an update, but it explains the general concept.



            Rolling back is done using snap revert:




            daniel@daydream:~$ snap revert --help
            Usage:
            snap [OPTIONS] revert



            The revert command reverts the given snap to its state before the
            latest refresh. This will reactivate the previous snap revision, and
            will use the original data that was associated with that revision,
            discarding any data changes that were done by the latest revision. As
            an exception, data which the snap explicitly chooses to share across
            revisions is not touched by the revert process.



            Application Options:
            --version print the version and exit



            Help Options: -h, --help Show this help message
            daniel@daydream:~$







            share|improve this answer














            Answer from doug, somewhat extended:



            /snap/* is read-only and snaps are mounted there. The reason for this is that snapd allows you to roll back to an older version of a given snap, that's why it keeps multiple versions. Calling snap remove will remove them all from the system again. There is a r/w location for snaps, but that's unrelated. https://developer.ubuntu.com/en/snappy/guides/garbage needs an update, but it explains the general concept.



            Rolling back is done using snap revert:




            daniel@daydream:~$ snap revert --help
            Usage:
            snap [OPTIONS] revert



            The revert command reverts the given snap to its state before the
            latest refresh. This will reactivate the previous snap revision, and
            will use the original data that was associated with that revision,
            discarding any data changes that were done by the latest revision. As
            an exception, data which the snap explicitly chooses to share across
            revisions is not touched by the revert process.



            Application Options:
            --version print the version and exit



            Help Options: -h, --help Show this help message
            daniel@daydream:~$








            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 13 '17 at 12:25









            Community

            1




            1










            answered Jul 29 '16 at 9:33









            dholbach

            1,354824




            1,354824

























                2














                In speaking with Ubuntu developers, the current default is to keep three prior versions of a snap so that you can roll-back to a prior version if needed. This default setting is not configurable.



                You can use the command snap remove --revision=<an old one> snapname to remove an older revision of a snap.



                They are considering whether to have only the current snap mounted as a loop filesystem, but I don't know the status of that.






                share|improve this answer


























                  2














                  In speaking with Ubuntu developers, the current default is to keep three prior versions of a snap so that you can roll-back to a prior version if needed. This default setting is not configurable.



                  You can use the command snap remove --revision=<an old one> snapname to remove an older revision of a snap.



                  They are considering whether to have only the current snap mounted as a loop filesystem, but I don't know the status of that.






                  share|improve this answer
























                    2












                    2








                    2






                    In speaking with Ubuntu developers, the current default is to keep three prior versions of a snap so that you can roll-back to a prior version if needed. This default setting is not configurable.



                    You can use the command snap remove --revision=<an old one> snapname to remove an older revision of a snap.



                    They are considering whether to have only the current snap mounted as a loop filesystem, but I don't know the status of that.






                    share|improve this answer












                    In speaking with Ubuntu developers, the current default is to keep three prior versions of a snap so that you can roll-back to a prior version if needed. This default setting is not configurable.



                    You can use the command snap remove --revision=<an old one> snapname to remove an older revision of a snap.



                    They are considering whether to have only the current snap mounted as a loop filesystem, but I don't know the status of that.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Apr 9 '18 at 21:05









                    j1mc

                    373512




                    373512























                        1














                        Snapd will automatically retain three revisions (usually current plus two older) by default, and will delete older.



                        In mid-2018, snapd was updated so that the number of revisions is configurable (though never less than 2).



                        Use the command:



                        snap set system refresh.retain=N



                        N cannot be less than two.






                        share|improve this answer


























                          1














                          Snapd will automatically retain three revisions (usually current plus two older) by default, and will delete older.



                          In mid-2018, snapd was updated so that the number of revisions is configurable (though never less than 2).



                          Use the command:



                          snap set system refresh.retain=N



                          N cannot be less than two.






                          share|improve this answer
























                            1












                            1








                            1






                            Snapd will automatically retain three revisions (usually current plus two older) by default, and will delete older.



                            In mid-2018, snapd was updated so that the number of revisions is configurable (though never less than 2).



                            Use the command:



                            snap set system refresh.retain=N



                            N cannot be less than two.






                            share|improve this answer












                            Snapd will automatically retain three revisions (usually current plus two older) by default, and will delete older.



                            In mid-2018, snapd was updated so that the number of revisions is configurable (though never less than 2).



                            Use the command:



                            snap set system refresh.retain=N



                            N cannot be less than two.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jan 2 at 1:34









                            user535733

                            7,73722942




                            7,73722942






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f803275%2fsystem-keeps-older-snap-packages%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                數位音樂下載

                                When can things happen in Etherscan, such as the picture below?

                                格利澤436b