Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Feature Requests
  3. Add `apt autoremove`

Add `apt autoremove`

Scheduled Pinned Locked Moved Feature Requests
aptubuntu
21 Posts 6 Posters 3.1k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • rmdesR rmdes

    @nebulon I think this : sudo apt autoremove --purge
    should be enough to clean up old kernels safely
    edit : The above commands only work on newer systems as all old Linux kernels and headers automatically flagged as no more needed, and thus can be purged.

    this link has all the different ways to remove old kernels safely : https://www.cyberciti.biz/faq/ubuntu-18-04-remove-all-unused-old-kernels/

    necrevistonnezrN Offline
    necrevistonnezrN Offline
    necrevistonnezr
    wrote on last edited by necrevistonnezr
    #4

    @rmdes
    Cloudron is on 16.04, so

    sudo purge-old-kernels && sudo apt autoremove && sudo apt autoclean
    

    should be correct IMHO.

    mehdiM 1 Reply Last reply
    1
    • necrevistonnezrN necrevistonnezr

      @rmdes
      Cloudron is on 16.04, so

      sudo purge-old-kernels && sudo apt autoremove && sudo apt autoclean
      

      should be correct IMHO.

      mehdiM Offline
      mehdiM Offline
      mehdi
      App Dev
      wrote on last edited by
      #5

      @necrevistonnezr said in Add `apt autoremove`:

      Cloudron is on 16.04

      Cloudron runs currently on both 16.04 and 18.04, and soon on 20.04

      necrevistonnezrN 1 Reply Last reply
      2
      • mehdiM mehdi

        @necrevistonnezr said in Add `apt autoremove`:

        Cloudron is on 16.04

        Cloudron runs currently on both 16.04 and 18.04, and soon on 20.04

        necrevistonnezrN Offline
        necrevistonnezrN Offline
        necrevistonnezr
        wrote on last edited by
        #6

        @mehdi Right! I even asked for 18.04 back in the day ! 🤖 Alzheimers....

        1 Reply Last reply
        0
        • girishG Do not disturb
          girishG Do not disturb
          girish
          Staff
          wrote on last edited by
          #7

          I assume this feature is to autoremove stuff is only for removing old kernels? I have to say I have not seen the issue of boot filling up in Ubuntu 18. Has anyone hit this in bionic?

          Also, ubuntu security updates does not add new packages (only updates existing ones). So, AFAIK, this feature is only for removing kernels and nothing else. I am happy to add some button (instead of an automated cron).

          mehdiM rmdesR 2 Replies Last reply
          0
          • girishG girish

            I assume this feature is to autoremove stuff is only for removing old kernels? I have to say I have not seen the issue of boot filling up in Ubuntu 18. Has anyone hit this in bionic?

            Also, ubuntu security updates does not add new packages (only updates existing ones). So, AFAIK, this feature is only for removing kernels and nothing else. I am happy to add some button (instead of an automated cron).

            mehdiM Offline
            mehdiM Offline
            mehdi
            App Dev
            wrote on last edited by
            #8

            @girish autoremove removes packages which were installed automatically (as dependencies of other packages you installed), and which are not needed anymore.

            For example, if you install package A manually at version 1.0, which depends on package B, then at a later point in time A gets updated to 2.0 which does not depend on B anymore. Well in this case, B stays installed, but is not necessary, and autoremove removes it.

            girishG 1 Reply Last reply
            1
            • mehdiM mehdi

              @girish autoremove removes packages which were installed automatically (as dependencies of other packages you installed), and which are not needed anymore.

              For example, if you install package A manually at version 1.0, which depends on package B, then at a later point in time A gets updated to 2.0 which does not depend on B anymore. Well in this case, B stays installed, but is not necessary, and autoremove removes it.

              girishG Do not disturb
              girishG Do not disturb
              girish
              Staff
              wrote on last edited by
              #9

              @mehdi Right, but I meant in the context of Cloudron why does one ever need to 'autoremove'? Since Cloudron itself doesn't install packages once installed. Is this for the use case of people installing some packages outside of Cloudron (if so, is it then wise to autoremove stuff?)?

              mehdiM 1 Reply Last reply
              0
              • girishG girish

                @mehdi Right, but I meant in the context of Cloudron why does one ever need to 'autoremove'? Since Cloudron itself doesn't install packages once installed. Is this for the use case of people installing some packages outside of Cloudron (if so, is it then wise to autoremove stuff?)?

                mehdiM Offline
                mehdiM Offline
                mehdi
                App Dev
                wrote on last edited by
                #10

                @girish In cloudron's case, yeah I don't see anything other than kernels off the top of my head where this could apply, but it's still possible for dependencies of other packages.

                In any case, I have personally never seen a case where autoremove broke stuff.

                girishG 1 Reply Last reply
                0
                • mehdiM mehdi

                  @girish In cloudron's case, yeah I don't see anything other than kernels off the top of my head where this could apply, but it's still possible for dependencies of other packages.

                  In any case, I have personally never seen a case where autoremove broke stuff.

                  girishG Do not disturb
                  girishG Do not disturb
                  girish
                  Staff
                  wrote on last edited by girish
                  #11

                  @mehdi hmmm, I went back and checked and indeed the install script does not call autoremove in the end, maybe it should.

                  This feature request started with "As Cloudron does automatic security and system updates", so I just want to point out that neither of those require auto-remove since additional packages are not installed and the security updates are very conservative and not dramatic (like removing deps etc). So, except for this kernel stuff, we don't need autoremove, I think. I don't completely understand why ubuntu itself doesn't have a mechanism for this. Happy to be corrected here though 🙂

                  robiR 1 Reply Last reply
                  0
                  • girishG girish

                    I assume this feature is to autoremove stuff is only for removing old kernels? I have to say I have not seen the issue of boot filling up in Ubuntu 18. Has anyone hit this in bionic?

                    Also, ubuntu security updates does not add new packages (only updates existing ones). So, AFAIK, this feature is only for removing kernels and nothing else. I am happy to add some button (instead of an automated cron).

                    rmdesR Offline
                    rmdesR Offline
                    rmdes
                    wrote on last edited by
                    #12

                    @girish have seen this, but like 2 years ago ?😳

                    1 Reply Last reply
                    0
                    • girishG girish

                      @mehdi hmmm, I went back and checked and indeed the install script does not call autoremove in the end, maybe it should.

                      This feature request started with "As Cloudron does automatic security and system updates", so I just want to point out that neither of those require auto-remove since additional packages are not installed and the security updates are very conservative and not dramatic (like removing deps etc). So, except for this kernel stuff, we don't need autoremove, I think. I don't completely understand why ubuntu itself doesn't have a mechanism for this. Happy to be corrected here though 🙂

                      robiR Offline
                      robiR Offline
                      robi
                      wrote on last edited by
                      #13

                      Wow this really exploded while I slept.

                      @girish That is not a correct conclusion.
                      @mehdi is correct above.

                      Even with Cloudron not installing anything new, the system will over time end up with orphaned dependencies that can be removed. This includes old kernels.

                      It will not harm the system, only keep it less cluttered and do the right thing(tm). 😉

                      Please do the needful. 🤗

                      Conscious tech

                      1 Reply Last reply
                      1
                      • mehdiM Offline
                        mehdiM Offline
                        mehdi
                        App Dev
                        wrote on last edited by
                        #14

                        Even if not automatic, I think a button do to it manually would do the job.

                        That plus a warning for admins that the boot partition is nearly full would cover a great majority of usecases i think

                        robiR 1 Reply Last reply
                        1
                        • mehdiM mehdi

                          Even if not automatic, I think a button do to it manually would do the job.

                          That plus a warning for admins that the boot partition is nearly full would cover a great majority of usecases i think

                          robiR Offline
                          robiR Offline
                          robi
                          wrote on last edited by
                          #15

                          @mehdi Why give the admin yet another button when it can be eliminated altogether? I'd rather do it on CLI then.

                          Point is, I don't want to see autoremove whenever I run apt or have to deal with kernels filling up for poorly planned partitions or side-effects of OS vendor releasing lots of kernels and not cleaning up.

                          Conscious tech

                          necrevistonnezrN 1 Reply Last reply
                          0
                          • robiR robi

                            @mehdi Why give the admin yet another button when it can be eliminated altogether? I'd rather do it on CLI then.

                            Point is, I don't want to see autoremove whenever I run apt or have to deal with kernels filling up for poorly planned partitions or side-effects of OS vendor releasing lots of kernels and not cleaning up.

                            necrevistonnezrN Offline
                            necrevistonnezrN Offline
                            necrevistonnezr
                            wrote on last edited by
                            #16

                            @robi said in Add `apt autoremove`:

                            Point is, I don't want to see autoremove whenever I run apt or have to deal with kernels filling up for poorly planned partitions or side-effects of OS vendor releasing lots of kernels and not cleaning up.

                            If autoremove gets integrated in the Cloudron apt update routine, you wouldn't "see" it?!

                            robiR 1 Reply Last reply
                            0
                            • necrevistonnezrN necrevistonnezr

                              @robi said in Add `apt autoremove`:

                              Point is, I don't want to see autoremove whenever I run apt or have to deal with kernels filling up for poorly planned partitions or side-effects of OS vendor releasing lots of kernels and not cleaning up.

                              If autoremove gets integrated in the Cloudron apt update routine, you wouldn't "see" it?!

                              robiR Offline
                              robiR Offline
                              robi
                              wrote on last edited by robi
                              #17

                              @necrevistonnezr No, as it would be run regularly in the background.

                              Hence when I run apt install blah manually, it has a low chance of finding it needs to remove something via autoremove.

                              Conscious tech

                              mehdiM 1 Reply Last reply
                              0
                              • robiR robi

                                @necrevistonnezr No, as it would be run regularly in the background.

                                Hence when I run apt install blah manually, it has a low chance of finding it needs to remove something via autoremove.

                                mehdiM Offline
                                mehdiM Offline
                                mehdi
                                App Dev
                                wrote on last edited by
                                #18

                                @robi said in Add `apt autoremove`:

                                Hence when I run apt install blah manually

                                Aren't you not supposed to install stuff manually on cloudron?

                                necrevistonnezrN 1 Reply Last reply
                                3
                                • nebulonN Offline
                                  nebulonN Offline
                                  nebulon
                                  Staff
                                  wrote on last edited by girish
                                  #19

                                  Indeed one shouldn't (install manually) to avoid breaking on updates, but in the end it is still ones own server 😉

                                  1 Reply Last reply
                                  0
                                  • mehdiM mehdi

                                    @robi said in Add `apt autoremove`:

                                    Hence when I run apt install blah manually

                                    Aren't you not supposed to install stuff manually on cloudron?

                                    necrevistonnezrN Offline
                                    necrevistonnezrN Offline
                                    necrevistonnezr
                                    wrote on last edited by
                                    #20

                                    @mehdi Exactly, we're talking about Cloudron background routines, not manual installing on the server.

                                    1 Reply Last reply
                                    0
                                    • robiR Offline
                                      robiR Offline
                                      robi
                                      wrote on last edited by
                                      #21

                                      Are you telling me that apt install screen is going to break updates? 😆

                                      Conscious tech

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Bookmarks
                                      • Search