Announcement

Collapse
No announcement yet.

apt-get autoremove - dangerous?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    apt-get autoremove - dangerous?

    When installing packages, the OS suggests using autoremove to remove some packages that are no longer used. Is this a good thing to do? Always worried it's going to remove something I need. Also hearing that I should remove old kernels, keeping only the last 2. Should/how I do this?

    #2
    you will get differing opinions on this Q.

    I dont use the autoremove option because I'm never sure if there realy not used ,,,,,LOL and I have lots of space (relatively)

    I do remove/purge old kernels-headers-modules as thay do use a bit of space (combined)

    I will open muon package manager (one of the few things I still use it for) ((not muon software center)) and hand pick the kernel versions I want to PURGE and the headers and modules for eatch ver. of kernel .

    purge will remove the .config's for all these ,,,,,,,remove will not .

    I am about to do just that right now as a mater of fact .

    these
    Code:
    vinny@vinny-Bonobo-Extreme:~$ ls /boot | grep vm
    [COLOR=#ff0000]vmlinuz-3.13.0-32-generic
    vmlinuz-3.13.0-37-generic
    vmlinuz-3.13.0-39-generic
    vmlinuz-3.13.0-40-generic[/COLOR]
    vmlinuz-3.13.0-43-generic
    vmlinuz-3.13.0-44-generic
    the 4 in read will get the axe

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      Looks like I only have 2 old kernels at this point. Need to get better with grep, any suggested reading? I have The Linux Command Line by William E Shotts jr, copyright 2012 and Linux Bible 8th edition also 2012. So, they're not too out of date, I guess.
      Last edited by vsreeser; Jan 17, 2015, 10:15 PM.

      Comment


        #4
        Originally posted by vsreeser View Post
        Looks like I only have 2 old kernels at this point. Need to get better with grep, any suggested reading? I have The Linux Command Line by William E Shotts jr, copyright 2012 and Linux Bible 8th edition also 2012. So, they're not too out of date, I guess.
        those look like good reads ,,,,,,maby I should

        OK
        just purged all the old kernels .........

        muon left pane filter by status>"autoremovable" start at bottom of list and select purge for each one



        this freed 1GB of space .

        now
        Code:
        vinny@vinny-Bonobo-Extreme:~$ ls /boot | grep vm
        vmlinuz-3.13.0-43-generic
        vmlinuz-3.13.0-44-generic
        vinny@vinny-Bonobo-Extreme:~$
        VINNY
        Last edited by vinnywright; Jan 17, 2015, 10:46 PM. Reason: added status to the filter line
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment


          #5
          Space is not a problem. Only using 7% of my linux drive (1 Tb). Anything that boosts performance, I will try though. Before I make any changes that may blow up the system, I use clonezilla to make an image of the drive on a partition that I don't mount in Linux or Windows. Must be an easier and faster way to do this though. Full image takes a while, even though very little space is used. Tried PING, it failed. Just want a full image I can restore if I blow things up

          Comment


            #6
            in 5 years of using Kubuntu I have never backed up anything ,,,,,,(my bad) so I do not know mutch about it ,,,,,,,,but

            http://askubuntu.com/questions/2596/...f-backup-tools

            and

            https://help.ubuntu.com/community/BackupYourSystem

            look like good places to start.

            start a new thread for this and/or search in the forum (I believe it has been discussed before)

            VINNY
            i7 4core HT 8MB L3 2.9GHz
            16GB RAM
            Nvidia GTX 860M 4GB RAM 1152 cuda cores

            Comment


              #7
              Vinny, I'm still not really clear on removing old kernels (though I've been doing it through Muon, so it seems). The posts on it are not all consistent.

              Is this statement true:

              ... for every kernel that you don't want anymore, remove the following three files:

              linux-headers-<version>
              linux-headers-<version>-generic
              linux-image-<version>-generic


              Ex.:
              linux-headers-2.6.32-23
              linux-headers-2.6.32-23-generic
              linux-image-2.6.32-23-generic
              If that is true, then ... for each version (e.g., for 2.6.32-23), which ONE of those do you highlight in Muon to purge?
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                off topic but could not resist.
                Originally posted by vsreeser View Post
                Anything that boosts performance, I will try though.
                If you want to boost performance get yourself a cheap sdd and put kubuntu on it and then use the 1TB drive to contain your home folder and backups. It is not that hard to do (you can keep all your customizations etc from your install now) and you will see/feel the performance gains without having to measure anything.
                The next step would be to buy a bigger SSD and put everything on it and just use your 1TB for audio/video/backup.
                I had my kubuntu install on a 29 GB SSD for a long time.
                Last edited by anika200; Jan 18, 2015, 07:11 AM.

                Comment


                  #9
                  Originally posted by Qqmike View Post
                  Vinny, I'm still not really clear on removing old kernels (though I've been doing it through Muon, so it seems). The posts on it are not all consistent.

                  Is this statement true:
                  ... for every kernel that you don't want anymore, remove the following three files:

                  linux-headers-<version>
                  linux-headers-<version>-generic
                  linux-image-<version>-generic


                  Ex.:
                  linux-headers-2.6.32-23
                  linux-headers-2.6.32-23-generic
                  linux-image-2.6.32-23-generic


                  If that is true, then ... for each version (e.g., for 2.6.32-23), which ONE of those do you highlight in Muon to purge?
                  I do ALL of them .

                  if you look at the screenshot you will see (ok so it is hard to read that tiny text) their is allso a ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

                  Linux-image-extra<version>generic

                  this has all the extra modules(drivers) and is about 150MB in size by it's self

                  it seams that when you select the filter "by status>auto-removable" it will not list the newest 2 kernels (thats good)

                  I sead to start at the bottom of the list to start selecting them for purge because it seems that if you select linux-headers<version> for purge , then linux-headers<version>generic muon wont offer purge as an option ,,,,,,,,,you half to select the "generic" for purge first .
                  i7 4core HT 8MB L3 2.9GHz
                  16GB RAM
                  Nvidia GTX 860M 4GB RAM 1152 cuda cores

                  Comment


                    #10
                    As Vinny said, you will get different opinions on this.

                    I let auto-remove remove old kernels, AFTER confirming the 'keep last 2 kernels' bit is working. In other words, I run an 'ls /boot' and check that what auto-remove is going to do is sane.

                    See the '01autoremove-kernels' file in /etc/apt/apt.conf.d if you are interested in where the 'keep last 2' magic happens.

                    The books you mentioned are probably valuable and worth reading. However, they may not cover something like this that is both package management specific (apt, not rpm or pacman, etc.) and possibly distro-specific (not sure if removing old kernels is a Debian thing or an Ubuntu thing, or a Debian thing that Ubuntu implements in a slightly different way than 'stock Debian').

                    Comment


                      #11
                      I always let autoremove do its magic. It keeps cruft off of my system. In the nearly six years I've been using Kubuntu I have never had autoremove cause a problem.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        dose then "autoremove" with out purge remove the configs , system map's initrd.img's as well ?

                        the initrd.img is 25MB each .

                        yes I know you can run
                        Code:
                        sudo apt-get autoremove --purge
                        and all the cruft will get removed , but dose every one , the new user, casual user ?

                        if you do not add the --purge to the autoremove you can get left with a lot of cruft after some time .

                        VINNY
                        i7 4core HT 8MB L3 2.9GHz
                        16GB RAM
                        Nvidia GTX 860M 4GB RAM 1152 cuda cores

                        Comment


                          #13
                          Autoremove won't delete config files, but if you look at what is being uninstalled is most often unused library files, and those won't have that anyway.

                          Actually, for those packages that have uninstall (postrm) scripts, those will be run as they would in any removal , so the initrd, update-grub etc for kernels is run.
                          Last edited by claydoh; Jan 18, 2015, 05:23 PM.

                          Comment


                            #14
                            Originally posted by claydoh View Post
                            Autoremove won't delete config files, but if you look at what is being uninstalled is most often unused library files, and those won't have those anyway.

                            Actually, for those packages that have uninstall (postrm) scripts, those will be run as they would in any removal , so the initrd, update-grub etc for kernels is run.
                            A ,,,,I stand corrected.
                            I never used just the remove option wile removing Kernels.

                            VINNY
                            i7 4core HT 8MB L3 2.9GHz
                            16GB RAM
                            Nvidia GTX 860M 4GB RAM 1152 cuda cores

                            Comment


                              #15
                              Read about people using 2 ssd in a raid 0 config, then partitioning the resulting drive. What's the point of that? Is a .01 second increase in load time worth it.

                              Comment

                              Working...
                              X