LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Is this apt-get autoremove operation safe? (https://www.linuxquestions.org/questions/debian-26/is-this-apt-get-autoremove-operation-safe-935534/)

edbarx 03-20-2012 02:26 PM

Is this apt-get autoremove operation safe?
 
I have just upgraded to Wheezy and apt-get autoremove is saying there are the following packages which may be safely removed. I have kde 4.7.4 installed.

Code:

/home/edbarx# apt-get autoremove
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following packages will be REMOVED:
  acl foomatic-filters-ppds g++-4.4 gksu hal hal-info hplip-data kaboom kdebase-apps kdebase-bin kdebase-workspace
  kdegraphics-libs-data konq-plugins-l10n libart-2.0-2 libavcodec52 libavformat52 libavutil49 libavutil50
  libboost-program-options1.42.0 libcolord1 libdvbpsi6 libebml0 libeggdbus-1-0 libexif12 libfftw3-3 libfreezethaw-perl libfs6
  libgail18 libgirepository1.0-0 libgksu2-0 libgmp3c2 libgnome-keyring-common libgnome-keyring0 libgphoto2-l10n libgphoto2-port0
  libgps19 libgs8 libgsf-1-114 libgsf-1-common libgtop2-7 libgtop2-common libhal-storage1 libhal1 libhunspell-1.2-0 libicu44
  libidl0 libieee1284-3 libjpeg62 libkdcraw-data libkephal4 libkexiv2-8 libkipi7 libksane-data libkwineffects1a libmaa2
  libmagickcore3 libmagickcore3-extra libmagickwand3 libmarblewidget4 libmatroska0 libmediastreamer0 libmldbm-perl libmozjs2d
  libmusicbrainz4c2a libnl1 libnm-glib2 libnm-util1 libnotify1 libofa0 liborbit2 libpango1.0-common libplasmaclock4a
  libpolkit-qt-1-0 libpoppler5 libpostproc51 libprocesscore4a libqt4-webkit libraptor1 librasqal2 libsane-common libsane-extras
  libsane-extras-common libsane-hpaio libsmpeg0 libsolidcontrol4 libsolidcontrolifaces4 libstdc++6-4.4-dev libsvga1 libswscale0
  libtaskmanager4a libtunepimp5 libvpx0 libweather-ion4a libwebkit-1.0-2 libwebkit-1.0-common libx264-118 libxcb-atom1
  libxcb-aux0 libxcb-event1 libxcb-render-util0 libxine1-console libxklavier16 min12xxw openvpn-blacklist pnm2ppa python-imaging
  python-pexpect python-renderpm python-reportlab python-reportlab-accel sudo x11-apps x11-session-utils x11-xfs-utils
  xbase-clients xinit xulrunner-1.9.1
0 upgraded, 0 newly installed, 117 to remove and 0 not upgraded.
After this operation, 197 MB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.


craigevil 03-20-2012 02:30 PM

Ouch! No , not when it wants to remove that many packages and things like hal, and all the python stuff.

Try running apt-get -f install
or Open Synaptic and see what it says in either Obsolete or Autoremovable, something needs to be installed that was some how removed.

I find the safest thing to do is disable autoremove in apt.conf.

Code:

# cat /etc/apt/apt.conf

// auto-remove breaks on meta packages
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";

// Recommends are as of now still abused in many packages
APT::Install-Recommends "0";
APT::Install-Suggests "0";
Debug::pkgAutoRemove "0";

// PDiffs reduce the required download for apt-get update, but increase the
// CPU requirements and quite often fail.
Acquire::PDiffs "0";

// Remove apt unauthenticated warnings
APT::Get::AllowUnauthenticated "0";

Quote:

# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.

T3RM1NVT0R 03-20-2012 02:31 PM

@ Reply
 
Hi edbarx,

Yes it is safe to use apt-get autoremove option. It removes the packages that are no longer needed so you can use this option.

@ craigevil

As I can see from the man apt-get page it says:

Code:

      autoremove
          autoremove is used to remove packages that were automatically
          installed to satisfy dependencies for some package and that are no
          more needed.

Could you please explain why this option cannot be used? I mean is there a specific reason?

snowday 03-20-2012 02:38 PM

As the name suggests, apt-get AUTOremove is an automated operation where the system takes its "best guess" what you are trying to achieve. It should not be used as a substitute for common sense system administration.

Since you are new to Debian Testing you should definitely do some basic reading first. It is actually a fairly common situation in Testing that the user must go on the forum/mailing-lists to understand a particular update situation.

The safest thing to do is not use the (completely optional!!) apt-get autoremove until you understand the situation. Personally at this stage my next step would be to use tasksel to make sure you have installed the correct metapackages (I'm guessing you want Desktop Environment, right?) to avoid the situation of autoremove removing wanted packages.

DISCLAIMER: I am not a Testing user myself, and I know there are some pretty knowledgable Testing users here, so take my advice with a grain of salt. :)

edbarx 03-20-2012 03:34 PM

Wheezy is not misbehaving. I already did some reading to learn about the listed packages for removal. Whenever there is a big list of packages for removal, it is always safer to be on the side of caution. However, even if I remove the packages, I can still take a note of packages' names, save them to a file and use:
Code:

apt-get install $(cat removed-packages-list)
Code:

/home/edbarx# apt-get -f install
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following packages were automatically installed and are no longer required:
  x11-apps libxcb-aux0 libprocesscore4a libswscale0 libgsf-1-common libxcb-atom1 pnm2ppa libavutil50 libgail18 libavutil49
  libgphoto2-l10n libhal-storage1 libwebkit-1.0-common libpolkit-qt-1-0 libgphoto2-port0 libxklavier16 libsane-hpaio
  libplasmaclock4a xbase-clients libicu44 libx264-118 libkipi7 libkwineffects1a libmagickcore3 libweather-ion4a libsvga1
  python-reportlab g++-4.4 libnm-util1 python-imaging libmagickwand3 libboost-program-options1.42.0 libtunepimp5 libgps19
  libfftw3-3 libnotify1 libkexiv2-8 openvpn-blacklist librasqal2 libdvbpsi6 python-renderpm libcolord1 libavcodec52
  libkdcraw-data x11-session-utils libsolidcontrol4 libsolidcontrolifaces4 libxcb-event1 acl libpango1.0-common
  libgirepository1.0-0 libgmp3c2 libhal1 hal sudo x11-xfs-utils kdebase-bin libvpx0 libnm-glib2 kdegraphics-libs-data
  xulrunner-1.9.1 libmatroska0 libgsf-1-114 libgtop2-common libpoppler5 libieee1284-3 libidl0 libpostproc51 libxine1-console
  libsane-common xinit libfs6 libfreezethaw-perl libgs8 libavformat52 libhunspell-1.2-0 libkephal4 libtaskmanager4a libgtop2-7
  libmozjs2d libjpeg62 libwebkit-1.0-2 gksu libgnome-keyring0 libgnome-keyring-common libsane-extras foomatic-filters-ppds libnl1
  liborbit2 libksane-data libmaa2 libgksu2-0 libeggdbus-1-0 libart-2.0-2 python-pexpect libqt4-webkit libraptor1
  konq-plugins-l10n libmusicbrainz4c2a libmagickcore3-extra libmarblewidget4 hal-info kdebase-apps libsane-extras-common
  libexif12 min12xxw libebml0 libxcb-render-util0 kaboom libmldbm-perl libofa0 kdebase-workspace hplip-data libstdc++6-4.4-dev
  python-reportlab-accel libmediastreamer0 libsmpeg0
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I didn't continue with the removal operation.

T3RM1NVT0R 03-20-2012 03:56 PM

@ Reply
 
As far as I know if you use apt-get install to install the stuff on your system then apt-get autoremove should not hurt. It might create a problem if you do install stuff explicitly (that is without using apt-get install).

In that case apt-get autoremove might make a mistake as it will not be aware about the packages dependency of the package that you have installed explicitly.

snowday 03-20-2012 04:12 PM

If as you say you went from Squeeze to Wheezy, then a lot of stuff might just have been obsoleted. :)

TobiSGD 03-20-2012 05:01 PM

Quote:

Originally Posted by T3RM1NVT0R (Post 4631842)
Could you please explain why this option cannot be used? I mean is there a specific reason?

Take the time and do a web search for "Debian meta-package problem", I think you will find plenty of explanations.
In short, Debian developers create meta-packages that don't contain any software, but have a lot of dependencies. This is used, for example, to install a complete desktop system with a single apt-get command, for example apt-get install gnome. In this case the package doesn't contain Gnome, but is dependent on all packages the Debian developers think that should be part of a Gnome install.
The problem with this approach: If you (or an update) removes a package that is part of this dependency list the auto-remove function wants to remove all other packages in the dependency list, leaving you with a system without working desktop (and sometimes even with a completely broken system).
apt-get autoremove is a dangerous weapon, use it with care (and edbarx has done that, rather ask than mindlessly confirm to rip out half of the system, relying on an automatic function).

Having said that, I thank Pat Volkerding for this one great system without automatic dependency resolution.

T3RM1NVT0R 03-20-2012 06:54 PM

@ Reply
 
Quote:

Originally Posted by TobiSGD (Post 4631958)
Take the time and do a web search for "Debian meta-package problem", I think you will find plenty of explanations.
In short, Debian developers create meta-packages that don't contain any software, but have a lot of dependencies. This is used, for example, to install a complete desktop system with a single apt-get command, for example apt-get install gnome. In this case the package doesn't contain Gnome, but is dependent on all packages the Debian developers think that should be part of a Gnome install.
The problem with this approach: If you (or an update) removes a package that is part of this dependency list the auto-remove function wants to remove all other packages in the dependency list, leaving you with a system without working desktop (and sometimes even with a completely broken system).
apt-get autoremove is a dangerous weapon, use it with care (and edbarx has done that, rather ask than mindlessly confirm to rip out half of the system, relying on an automatic function).

Having said that, I thank Pat Volkerding for this one great system without automatic dependency resolution.

I did some web search and came across this: http://administratosphere.wordpress....et-autoremove/

I can make out the following points from this link:

1. When you install a package using:
Code:

apt-get install <package name>
system consider it as a package which user wants to install. The packages which will be required as a dependency to this package will be considered as automatic package installation. So basically the initial command that has been given to install a package is explicit or manual install.

2. As you said about meta-package it is a package that contains all the dependency and it is not a software in itself. I found it to be like a shopping list (read somewhere). So basically meta-package is not a dish itself but ingredients that will be used in a dish.

Questions that is still bothering me is the later explanation in that article. Let us assume that I have installed gnome using:

Code:

apt-get install gnome
Now, this will install all the packages that are required by gnome. Now I went ahead and did a search of packages that were installed as part of dependency resolution during gnome installation using:

Code:

apt-get -s autoremove | less
And I planned to remove say gnome office using explicit command:

Code:

apt-get remove gnome-office
When I did the above and then ran:

Code:

apt-get autoremove
It came up stating that there is one package to remove named simple-scan. Now this package is used basically for providing scanning functionality for documents / images. Since gnome office has been removed this application system think is no longer required and which is correct.

Thing that is still confusing me is how system calculates which things to include/exclude in autoremove option.

TobiSGD 03-20-2012 07:11 PM

Did you do that on Ubuntu or on Debian? AFAIK, those both distributions handle the marking of automatically installed packages differently, Ubuntu handles it in a way that is more newbie friendly by marking those dependencies as manually installed to prevent newbies from accidentally delete half the system with apt-get, while Debian assumes that you are knowing what you do when you are playing with the package manager.

widget 03-20-2012 09:13 PM

I am certainly no expert on running Debian testing. I do have, however, this install of it which I have used for about 2 years as my production OS.

I wouldn't use the autoremove command if I were you.

Just pulled it up to take a look at it and in about 15 seconds of glancing at it only picked out to packages that are currently in use.

Admittedly it would not be a disaster if I removed lobrhythmbox-core5 or rhythmbox-data. Rhythmbox depends on both of these so I think it may suffer but could be reinstalled easily.

I do have a lot of experience with Ubuntu testing releases. Using auto remove on them is a very good way to break your system.

This is a command that is intended for stable releases.

You could easily go to synaptic and go through the list there. Select one at a time and hit apply. It will offer you a chance to back out. See what all is being removed.

You can set your preferences in Synaptic to show a lot of info. Just highlighting a package will give you info on the depends for instance.

I would be shocked if there are no some packages listed there that you have no need of at all. Maybe even a majority of them. I would be more shocked if just using the autoremove command did not do some very serious damage to your system.

Yes you can fix it after that. It is a lot easier to not break it in the first place.

k3lt01 03-20-2012 10:15 PM

Craigevil has given good solid and sound advice, if I were you I would heed it. Snowpine and Tobi have also given good advice. Widget is just full of good advice.

Now to mine and I'll give you an example to clarify it. If you have modified the system in any way your package lists will be different to the "official" package lists. If you have removed any packages at all you may find you have caused the removal of a dependency of a smetapackage. Metapackages are used to pull in a bunch of other packages but have no other use. If you have inadvertantly removed a metapackage dependency you will now see other packages listed as dependencies of that metapackage in the autoremove list.

So as an example say you have removed openoffice/libreoffice you will have caused a meta package to try and install other software like gnomeoffice or something similar. If you do not allow that to install apt will place many parts of Gnome (I can't give an example in KDE but it will do the same) in the autoremove list. If you allow the autoremove you will break your desktop environment and find it near impossible to do simple things like log in, open applications or even (I did this once) shut down.

As already pointed out, autoremove is indicating you now have a dependency problem. My gut feeling is you have accidentally removed a dependencies of a metapackage so the remaining dependencies are listing as autoremoveable.

edbarx 03-21-2012 01:00 AM

Actually, I have upgraded a full system (Squeeze with kde) to Wheezy. The upgrade process itself crashed and I had to revive it by issuing and apt-get -f install command. That, complained that it couldn't work because there was a dependency problem. I used dkpg -i to resolve the latter and then apt-get -f install. However, apt-get -f install, continued till the very end of the installation probably assuming it was not a dist-upgrade what I needed. After that, I reapplied an apt-get dist-upgrade to correct the remaining problems and did some package auditing to verify that I did not have any remaining packages from Squeeze.

As long as the system boots in CLI, it should not be a problem, although there is still the chance of using a chroot from within another working installation. That should enable one to repair the system and it would be an interesting experiment to try.

I think, the safest action to take is to backup the entire installation, attempt a removal of the packages from outside kde (with kdm stopped) and reinstall the deleted packages. That should eliminate the need for the missing meta package.

k3lt01 03-21-2012 03:23 AM

Quote:

Originally Posted by edbarx (Post 4632226)
I think, the safest action to take is to backup the entire installation, attempt a removal of the packages from outside kde (with kdm stopped) and reinstall the deleted packages. That should eliminate the need for the missing meta package.

Yes or fix it with it all running anyway. I don't see why you would deliberately complicate the procedure if it will actually boot to KDE and function normally anyway.

T3RM1NVT0R 03-21-2012 04:18 PM

@ Reply
 
Quote:

Originally Posted by TobiSGD (Post 4632053)
Did you do that on Ubuntu or on Debian? AFAIK, those both distributions handle the marking of automatically installed packages differently, Ubuntu handles it in a way that is more newbie friendly by marking those dependencies as manually installed to prevent newbies from accidentally delete half the system with apt-get, while Debian assumes that you are knowing what you do when you are playing with the package manager.

I did that on Debian:

Code:

cat /etc/debian_version
6.0.4

I do agree with what people have said in the above posts which simply means it is better to be safe then sorry :-) but still I am unable to find the answers of my queries:

1. How apt-get autoremove calculates which packages to be removed.
2. If this option is so disastrous then why it is there.
3. When I did small testing with my Debian system it did not remove any package which was in use when I ran apt-get autoremove.

I mean if it is so dangerous then why does it exist there on the first place. I did try to find more information on this option on Debian's site but was unable to find much.

If we say that autoremove option sometimes remove the stuff which is required by the system then there is a problem with the code. It is like running "clear" command sometimes not only clears the screen but make the screen go black till you reboot :-)

edbarx 03-21-2012 05:14 PM

I took a note of the list of packages marked for auto-removal and saved them in a text file. Then I issued the command:
Code:

# apt-get install $(cat file-with-package-names)
I did the above to set all the listed packages as set to manually installed instead of automatically installed. This led the system to keep the packages while at the same time I can use the autoremove feature for other purposes.

The commands together withe the CLI output are listed below:
Code:

# apt-get install $(cat Documents/packages-to-keep)
Reading package lists... Done
Building dependency tree     
Reading state information... Done
acl is already the newest version.
acl set to manually installed.
libcolord1 is already the newest version.
libfftw3-3 is already the newest version.
libfftw3-3 set to manually installed.
g++-4.4 is already the newest version.
g++-4.4 set to manually installed.
libstdc++6-4.4-dev is already the newest version.
libstdc++6-4.4-dev set to manually installed.
gksu is already the newest version.
libgail18 is already the newest version.
libgail18 set to manually installed.
hal is already the newest version.
hal set to manually installed.
libhal-storage1 is already the newest version.
libhal-storage1 set to manually installed.
libhal1 is already the newest version.
libhal1 set to manually installed.
hal-info is already the newest version.
hal-info set to manually installed.
hplip-data is already the newest version.
hplip-data set to manually installed.
libsane-hpaio is already the newest version.
kdebase-apps is already the newest version.
kdebase-apps set to manually installed.
kdebase-bin is already the newest version.
kdebase-bin set to manually installed.
kdebase-workspace is already the newest version.
kdebase-workspace set to manually installed.
libart-2.0-2 is already the newest version.
libart-2.0-2 set to manually installed.
libexif12 is already the newest version.
libexif12 set to manually installed.
libfreezethaw-perl is already the newest version.
libfreezethaw-perl set to manually installed.
libfs6 is already the newest version.
libfs6 set to manually installed.
libgksu2-0 is already the newest version.
libgksu2-0 set to manually installed.
libgnome-keyring-common is already the newest version.
libgnome-keyring-common set to manually installed.
libgnome-keyring0 is already the newest version.
libgnome-keyring0 set to manually installed.
libgphoto2-l10n is already the newest version.
libgphoto2-l10n set to manually installed.
libgphoto2-port0 is already the newest version.
libgphoto2-port0 set to manually installed.
libgsf-1-114 is already the newest version.
libgsf-1-114 set to manually installed.
libgsf-1-common is already the newest version.
libgsf-1-common set to manually installed.
libgtop2-7 is already the newest version.
libgtop2-7 set to manually installed.
libgtop2-common is already the newest version.
libgtop2-common set to manually installed.
libidl0 is already the newest version.
libidl0 set to manually installed.
libieee1284-3 is already the newest version.
libieee1284-3 set to manually installed.
libjpeg62 is already the newest version.
libjpeg62 set to manually installed.
libkdcraw-data is already the newest version.
libkdcraw-data set to manually installed.
libksane-data is already the newest version.
libksane-data set to manually installed.
libmldbm-perl is already the newest version.
libmldbm-perl set to manually installed.
libmusicbrainz4c2a is already the newest version.
libmusicbrainz4c2a set to manually installed.
libnl1 is already the newest version.
libnl1 set to manually installed.
libofa0 is already the newest version.
libofa0 set to manually installed.
libtunepimp5 is already the newest version.
libtunepimp5 set to manually installed.
libxklavier16 is already the newest version.
libxklavier16 set to manually installed.
kdegraphics-libs-data is already the newest version.
kdegraphics-libs-data set to manually installed.
min12xxw is already the newest version.
min12xxw set to manually installed.
openvpn-blacklist is already the newest version.
openvpn-blacklist set to manually installed.
liborbit2 is already the newest version.
liborbit2 set to manually installed.
python-pexpect is already the newest version.
python-pexpect set to manually installed.
pnm2ppa is already the newest version.
pnm2ppa set to manually installed.
python-imaging is already the newest version.
python-imaging set to manually installed.
python-renderpm is already the newest version.
python-renderpm set to manually installed.
python-reportlab is already the newest version.
python-reportlab set to manually installed.
python-reportlab-accel is already the newest version.
python-reportlab-accel set to manually installed.
libqt4-webkit is already the newest version.
libqt4-webkit set to manually installed.
libraptor1 is already the newest version.
libraptor1 set to manually installed.
libsane-common is already the newest version.
libsane-common set to manually installed.
libsane-extras is already the newest version.
libsane-extras set to manually installed.
libsane-extras-common is already the newest version.
libsane-extras-common set to manually installed.
libsmpeg0 is already the newest version.
libsmpeg0 set to manually installed.
sudo is already the newest version.
sudo set to manually installed.
libsvga1 is already the newest version.
libsvga1 set to manually installed.
x11-apps is already the newest version.
x11-session-utils is already the newest version.
x11-session-utils set to manually installed.
x11-xfs-utils is already the newest version.
x11-xfs-utils set to manually installed.
libxcb-render-util0 is already the newest version.
libxcb-render-util0 set to manually installed.
xinit is already the newest version.
xinit set to manually installed.
xbase-clients is already the newest version.
xbase-clients set to manually installed.
libxine1-console is already the newest version.
libxine1-console set to manually installed.
libmagickcore3 is already the newest version.
libmagickcore3 set to manually installed.
libavutil49 is already the newest version.
libavutil49 set to manually installed.
libmaa2 is already the newest version.
libmaa2 set to manually installed.
libgmp3c2 is already the newest version.
libgmp3c2 set to manually installed.
libavcodec52 is already the newest version.
libavcodec52 set to manually installed.
konq-plugins-l10n is already the newest version.
konq-plugins-l10n set to manually installed.
libsolidcontrol4 is already the newest version.
libsolidcontrol4 set to manually installed.
libboost-program-options1.42.0 is already the newest version.
libboost-program-options1.42.0 set to manually installed.
libkexiv2-8 is already the newest version.
libkexiv2-8 set to manually installed.
libnotify1 is already the newest version.
libnotify1 set to manually installed.
libnm-util1 is already the newest version.
libnm-util1 set to manually installed.
libmatroska0 is already the newest version.
libmatroska0 set to manually installed.
libmagickcore3-extra is already the newest version.
libmagickcore3-extra set to manually installed.
libkwineffects1a is already the newest version.
libkwineffects1a set to manually installed.
xulrunner-1.9.1 is already the newest version.
xulrunner-1.9.1 set to manually installed.
libmagickwand3 is already the newest version.
libmagickwand3 set to manually installed.
libkephal4 is already the newest version.
libkephal4 set to manually installed.
libvpx0 is already the newest version.
libvpx0 set to manually installed.
libxcb-event1 is already the newest version.
libxcb-event1 set to manually installed.
libebml0 is already the newest version.
libebml0 set to manually installed.
libgps19 is already the newest version.
libgps19 set to manually installed.
libx264-118 is already the newest version.
libx264-118 set to manually installed.
libxcb-aux0 is already the newest version.
libxcb-aux0 set to manually installed.
libpango1.0-common is already the newest version.
libpango1.0-common set to manually installed.
libxcb-atom1 is already the newest version.
libxcb-atom1 set to manually installed.
libplasmaclock4a is already the newest version.
libplasmaclock4a set to manually installed.
libswscale0 is already the newest version.
libswscale0 set to manually installed.
libhunspell-1.2-0 is already the newest version.
libhunspell-1.2-0 set to manually installed.
libmarblewidget4 is already the newest version.
libeggdbus-1-0 is already the newest version.
libeggdbus-1-0 set to manually installed.
libgs8 is already the newest version.
libgs8 set to manually installed.
foomatic-filters-ppds is already the newest version.
foomatic-filters-ppds set to manually installed.
libpoppler5 is already the newest version.
libpoppler5 set to manually installed.
libtaskmanager4a is already the newest version.
libtaskmanager4a set to manually installed.
kaboom is already the newest version.
kaboom set to manually installed.
libgirepository1.0-0 is already the newest version.
libgirepository1.0-0 set to manually installed.
libmozjs2d is already the newest version.
libmozjs2d set to manually installed.
libavutil50 is already the newest version.
libavutil50 set to manually installed.
libwebkit-1.0-2 is already the newest version.
libwebkit-1.0-2 set to manually installed.
libwebkit-1.0-common is already the newest version.
libwebkit-1.0-common set to manually installed.
libmediastreamer0 is already the newest version.
libmediastreamer0 set to manually installed.
libnm-glib2 is already the newest version.
libnm-glib2 set to manually installed.
libavformat52 is already the newest version.
libavformat52 set to manually installed.
librasqal2 is already the newest version.
librasqal2 set to manually installed.
libkipi7 is already the newest version.
libkipi7 set to manually installed.
libicu44 is already the newest version.
libicu44 set to manually installed.
libpostproc51 is already the newest version.
libpostproc51 set to manually installed.
libprocesscore4a is already the newest version.
libprocesscore4a set to manually installed.
libsolidcontrolifaces4 is already the newest version.
libsolidcontrolifaces4 set to manually installed.
libdvbpsi6 is already the newest version.
libdvbpsi6 set to manually installed.
libpolkit-qt-1-0 is already the newest version.
libpolkit-qt-1-0 set to manually installed.
libweather-ion4a is already the newest version.
libweather-ion4a set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
root@edbarx-pc2:/home/edbarx# apt-get autoremove
Reading package lists... Done
Building dependency tree     
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.


TobiSGD 03-21-2012 05:22 PM

Quote:

Originally Posted by T3RM1NVT0R (Post 4632969)
1. How apt-get autoremove calculates which packages to be removed.
2. If this option is so disastrous then why it is there.
3. When I did small testing with my Debian system it did not remove any package which was in use when I ran apt-get autoremove.

1. It simply seeks in its database for packages that are marked as automatically installed but are not dependencies for another package.
2. auto-remove is not dangerous in every case. It can become dangerous when it is used together with meta-packages. It is totally possible to install a Debian system without using any meta-package. It also is totally possible to build your own distro using the APT package management system without any meta-packages. It is just that it is convenient to use meta-packages. The same way you could ask why rm has the -rf option, although doing rm -rf /usr (WARNING, don't do that if you don't want to destroy your system) will in any case render your system unusable.
Since you are only be able to use apt-get auto-remove (or the rm thing) as root, it is up to your responsibility to actually think about what you are doing and read the output on the screen before confirming it.
3. Can not say much about that, I have seen many threads in different forums where auto-remove showed the behavior edbarx described, and back in the days I used Debian I also sometimes had problems with that, especially when using Sid (or Sid/Experimental mixes). If you use package management systems with automatic dependency resolution you should be prepared that sometimes odd things may happen. Again, this is why you always should read what is displayed on the screen before confirming anything (not saying that you don't do that).

edbarx 03-21-2012 05:23 PM

Debian's package management system differentiates between:
a) packages that were install explicitly by the user
b) packages that were automatically pulled in by system to satisfy dependences of packages that were installed explicitly.

Furthermore, there are empty packages which do not provide other functionality than providing a list of required packages. These are called meta-packages. If a meta-package is removed, than some/all of its dependencies may be marked as unneeded as they were not explicitly installed by the user. Meta-packages are useful in cases where the user needs a simple command to install a complex suit of software (say kde or gnome) with just the explicit installation of one package, the meta-package.

273 03-21-2012 05:28 PM

Personally I only come across this problem when I do a dist-upgrade. In day to day use autoremove just tends to suggest a few packages that, generally, I know can go but when it comes to just after a dist-upgrade, or a new install, I tend to leave autoremove until things settle down.
Might this be caused in part by dependency changes when upgrading, or am I complicating matters and it's just meta-packages?

widget 03-21-2012 05:48 PM

If you are using the command on a stable system such as Debian stable (Squeeze) there is little chance of a problem. Most problems there will be the result of user actions that change the "state" of the package.

If you are using a non stable OS such as Debian testing or Sid the chances of error are higher. The chances of user actions that change the state of the packages is also, I believe, higher.

That belief is based on my oppinion that users of this type of OS are more adventurous in their use of and play with the installation. I do know for a fact that this is true in at least one case, mine. Could be that I am simply crazy and other users are not.

It is a prefectly good command and very handy. As all tools are designed to be useful in stable OS's the fact that you need to be careful with them in other installs just makes sense.

Update Manager (or Update Mangler as I like to call it) is a good example of this. In a stable environment it is very handy for folks to use to keep their OS up to date.

Every cycle of Ubuntu testing, however, they get a lot of folks complaining that it broke their system. It does break their system.

It is designed to work with repos that are stable. Ubuntu-testing repos can get packages in them that do not have the depends in there yet. It is a newer version, it needs upgraded. The fact that the depends for the older version will not work is not part of the design of UM. It will tell you that it has a "partial upgrade" available. If you choose to use it that is not the fault of the tool.

Autoclean is a similar tool. Use it in Squeeze with a fair amount of confidence if you have not been making a lot of "strange" installs, particularly from the testing or unstable repos.

Use in testing or Sid with a lot of caution. This advice is similar to the advice to use testing or Sid as an OS should be used with caution.

Starting in the Debian experimental repo and migrating progressively through Sid and the testing repos filters the packages that finally arrive in the stable repo that is designed to be the repo for the OS Debian puts out for normal users to use. Those are the users that autoclean is aimed at. Those are the users and conditions it is designed for.

T3RM1NVT0R 03-22-2012 04:11 PM

@ Reply
 
@ All

Thanks for explaining.


All times are GMT -5. The time now is 03:22 PM.