Discussion:
[R-sig-Debian] autoremove_
Göran Broström
2018-08-01 08:08:34 UTC
Permalink
When I upgraded my ubuntu 18.04 system today, I got to my surprise:

-----------------------------------------------
***@M6800:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer
required:
littler r-cran-littler r-cran-pkgkitten
Use 'sudo apt autoremove' to remove them.
-------------------------------------------------

(Why) should I remove them? Why are they 'no longer required'?

Göran
Dirk Eddelbuettel
2018-08-01 11:37:33 UTC
Permalink
On 1 August 2018 at 10:08, Göran Broström wrote:
| When I upgraded my ubuntu 18.04 system today, I got to my surprise:
|
| -----------------------------------------------
| ***@M6800:~$ sudo apt upgrade
| Reading package lists... Done
| Building dependency tree
| Reading state information... Done
| Calculating upgrade... Done
| The following packages were automatically installed and are no longer
| required:
| littler r-cran-littler r-cran-pkgkitten
| Use 'sudo apt autoremove' to remove them.
| -------------------------------------------------
|
| (Why) should I remove them? Why are they 'no longer required'?

Educated guess, I am myself a little unsure here:

- when installing, the dpkg / apt / ... suite now marks a package as directly
installed (ie "user explicitly selected this"); I have seen this in a few
packages when doing 'apt show ...' but I am not entirely sure where this
is stored / how we can query and display it

- packages only installed as a dependency get a false flag here and may
get autoremoved which (I presume) aims and keeping the system tighter

- if you either let it uninstall them and reinstall them explicitly they
should be marked

- all three are Suggests of r-cran-rcpp

If anybody knows anything more concrete let us know.

Hth, Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Dirk Eddelbuettel
2018-08-01 12:31:04 UTC
Permalink
Here is an askubuntu post on complete disabling autoremove if you want that:
https://askubuntu.com/questions/555568/how-can-i-disable-apt-get-autoremove

Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Dirk Eddelbuettel
2018-08-01 14:24:45 UTC
Permalink
Göran,

Got it now (thanks to a slower/later than usual commute) -- see 'man apt' which has

autoremove (apt-get(8))
autoremove is used to remove packages that were automatically installed to satisfy
dependencies for other packages and are now no longer needed as dependencies changed or
the package(s) needing them were removed in the meantime.

You should check that the list does not include applications you have grown to like even
though they were once installed just as a dependency of another package. You can mark such
a package as manually installed by using apt-mark(8). Packages which you have installed
explicitly via install are also never proposed for automatic removal.

leading 'man apt-mark' with the details and commands. The actual file is

/var/lib/apt/extended_states
Status list of auto-installed packages. Configuration Item: Dir::State::extended_states.

and you can switch the state of auto-installed Suggests: or Recommended:
packages (like r-cran-littler et al in your case) to 'manual' which will
prevent any auto-removal.

Hope this helps, and thanks for bringing this up - had been meaning to look
around for this myself.

Cheers, Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Göran Broström
2018-08-01 15:30:30 UTC
Permalink
Dirk,

thanks a lot.

Best, Göran
Post by Dirk Eddelbuettel
Göran,
Got it now (thanks to a slower/later than usual commute) -- see 'man apt' which has
autoremove (apt-get(8))
autoremove is used to remove packages that were automatically installed to satisfy
dependencies for other packages and are now no longer needed as dependencies changed or
the package(s) needing them were removed in the meantime.
You should check that the list does not include applications you have grown to like even
though they were once installed just as a dependency of another package. You can mark such
a package as manually installed by using apt-mark(8). Packages which you have installed
explicitly via install are also never proposed for automatic removal.
leading 'man apt-mark' with the details and commands. The actual file is
/var/lib/apt/extended_states
Status list of auto-installed packages. Configuration Item: Dir::State::extended_states.
packages (like r-cran-littler et al in your case) to 'manual' which will
prevent any auto-removal.
Hope this helps, and thanks for bringing this up - had been meaning to look
around for this myself.
Cheers, Dirk
Loading...