Siduction Forum

Siduction Forum => Upgrade Warnings => Topic started by: cas on 2018/03/24, 01:34:06

Title: Is "no longer required" always reliable?
Post by: cas on 2018/03/24, 01:34:06
Hello,
below my current 'apt dist-upgrade -s'

The packages, that apt says are to be removed, are probably so, because of some transition.
apt also says, that many packages are superfluous now, so I can remove them myself.

My question is:
Can I generally depend on the latter statement? Or can it happen, that after some finished transition, some of the mentioned packages are not superfluous any more?

Thanks for your answer.
C

Code: [Select]
$LANG=C apt dist-upgrade -s

The following packages were automatically installed and are no longer required:
  libdns169 libfabric1 libgnome-desktop-3-12 libgweather-3-6 libhdf5-openmpi-100 libhwloc-plugins libhwloc5 libisc166 libjs-backbone libjs-bootstrap-tour libjs-codemirror
  libjs-es6-promise libjs-jed libjs-jquery-typeahead libjs-jquery-ui libjs-marked libjs-moment libjs-requirejs libjs-requirejs-text libjs-text-encoding libjs-xterm liblept5
  libnetcdf-c++4 libopencv-calib3d3.2 libopencv-contrib3.2 libopencv-features2d3.2 libopencv-flann3.2 libopencv-photo3.2 libopencv-shape3.2 libopencv-stitching3.2 libopencv-superres3.2
  libopencv-video3.2 libopencv-videostab3.2 libopencv-viz3.2 libopenmpi2 libpsm-infinipath1 libtesseract4 libvtk6.3 linux-headers-4.13.10-towo.2-siduction-amd64
  linux-headers-4.14.15-towo.1-siduction-amd64 linux-image-4.13.10-towo.2-siduction-amd64 linux-image-4.14.15-towo.1-siduction-amd64 python3-bleach python3-dateutil python3-entrypoints
  python3-html5lib python3-ipython python3-jinja2 python3-jsonschema python3-markupsafe python3-mistune python3-nbformat python3-pandocfilters python3-pickleshare python3-pyqt5
  python3-pyqt5.qtsvg python3-send2trash python3-simplegeneric python3-sip python3-terminado python3-testpath python3-tornado python3-webencodings
Use 'apt autoremove' to remove them.

The following packages will be REMOVED:
  jupyter-notebook jupyter-qtconsole python3-ipykernel python3-jupyter-client python3-nbconvert python3-notebook python3-qtconsole python3-zmq
Title: Re: Is "no longer required" always reliable?
Post by: devil on 2018/03/24, 07:15:44
I personallly never trusted autoremove nor will I ever. It is a good idea to go over the list and see if it makes sense. Other people just trust it and hit ENTER.
Title: Re: Is "no longer required" always reliable?
Post by: unklarer on 2018/03/24, 09:35:37
Of course, I'll go over the list and see if that's plausible.
Then I trust apt and have never been disappointed.   ;D

But everyone has to decide for himself.
Title: Re: Is "no longer required" always reliable?
Post by: piper on 2018/03/24, 12:35:23
I agree with devil :), I don't trust auto remove

Their are ways around this ;)
You can make a apt.conf file in /etc/apt/apt.conf.d/,  and add


Code: [Select]
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";

or

Code: [Select]
apt-mark manual <package-name>
Now auto remove won't remove it.

To undo this move

Code: [Select]
apt-mark auto <package-name>
auto remove *should remove the package if it is not a dependency of any other package.
Title: Re: Is "no longer required" always reliable?
Post by: vayu on 2018/03/24, 18:12:28
I've had autoremove break programs for me.  You're especially vulnerable if you've compiled things for yourself and installed dependencies for that. Same if you've downloaded programs or installed anything not in the repos you are currently using.  When autoremove suggests removing packages I usually spend a lot of time researching why it thinks that. In addition to apt-cache policy, apt-cache show and apt-cache rdepends I use a program apt-rdepends (with -r).  If I can't find a clear reason to remove it then I leave it. It's a balance, I don't want old stuff laying around but I don't want to break anything I may not realize until later and find it mysteriously doesn't work anymore.
Title: Re: Is "no longer required" always reliable?
Post by: bluelupo on 2018/03/24, 19:14:48
I have to ask a fundamental question. Is there any situation where a Autoremove is needed? In my estimation, the command is pretty useless.
Title: Re: Is "no longer required" always reliable?
Post by: devil on 2018/03/24, 19:39:54
Not really useless. It's supposed to offer libs for deletion that are not in use by any installed application anymore. Like vayu wrote, this is not always easy to determine.
Title: Re: Is "no longer required" always reliable?
Post by: dibl on 2018/03/24, 19:47:24
I have been using it since @melmarker wrote that it seems to be working correctly these days.  I have had no cause for regrets. 3 KDE systems, 2 LXQt.
Title: Re: Is "no longer required" always reliable?
Post by: sunrat on 2018/03/26, 00:18:38
In the OP example it wants to remove all old kernels. I would always want to keep at least one prior to the current one.
I prefer caution so would never actually run it but use the list of suggestions to investigate each package and remove it manually.
Title: Re: Is "no longer required" always reliable?
Post by: cas on 2018/03/26, 04:55:34
I personallly never trusted autoremove nor will I ever.
OK, autoremove is never reliable  ;)
also thanks for the other answers.

But the intention of my question was slightly different.

DU (still) wants to remove mainly python3 stuff.
I assume, that "autoremove" concludes, that when this python3 stuff isn't available any more, other python packages aren't necessary either.

I hope, DU will soon leave those python3/jupyter-packages alone again.
If that happens, some packages might vanish from the "no longer required"-list, that are now seen superfluous by "autoremove"?

Besides fundamental interest in this question,  it would be quite some work investigating all that packages, that might even be useless.

Title: Re: Is "no longer required" always reliable?
Post by: vayu on 2018/03/26, 05:41:28
I just looked up jupyter and those python packages are all needed for it.  My guess is that something that jupyter needs or maybe one of the python packages conflicts with another package or set of packages.  It would conflict if some of the packages it depends on have been updated but it has not yet.  You likely have the choice of updating as is and losing jupyter or putting jupyter on hold and then some of the packages now slated for upgrade will instead be held back. 

If you want jupyter I would put it on hold "# apt-mark hold jupyter" and then not worry that when you do a dist-upgrade some packages will be held back.
Title: Re: Is "no longer required" always reliable?
Post by: drb on 2018/03/26, 10:17:05
Python3 stuff now disappeared from my autoremove list with python3 package updates today.
Title: Re: Is "no longer required" always reliable?
Post by: cas on 2018/04/18, 14:17:33
I waited until recent transitions were over.
None of the above packages (mentioned in my first post) was removed.

So it may happen, that messages like "The following packages will be REMOVED", are completely unreliable.
Title: Re: Is "no longer required" always reliable?
Post by: devil on 2018/04/18, 18:19:42
I can't confirm your statement or ever heard anything about it. Sometimes in transitions packages are removed and at the same time reinstalled with a ever so slightly changed name, that can easily be missed reading through the output.
Title: Re: Is "no longer required" always reliable?
Post by: melmarker on 2018/04/18, 20:11:36
and the messages are reliable - at that point in time these packages would be removed ...