[Aptitude-devel] How use 'aptitude keep-all' without network connection?

Axel Beckert abe at debian.org
Sat May 20 13:15:11 BST 2017

Hi Patrick,

Patrick Schleizer wrote:
> I am using 'aptitude keep-all', since apt-get does not support that.

Yes, apt-get doesn't have the concept of scheduled actions, so it has
no need for a keep-all command.

> In a situation without networking (... script automation), 'aptitude
> keep-all' runs without networking and runs forever without timeout.

I'm sorry, but I can't reproduce this.

> Also package list updating isn't required at that point.

"aptitude keep-all" does not update the package list.

> Is it possible to have 'aptitude keep-all' run without trying to do any
> networking?

That's what it does and I can't see a reason at all, why it should
require network access. There's also no option like "Run 'aptitude
update' before doing anything else.

Since you're Cc'ing whonix-devel at whonix.org I'm assuming that you're
having that issue on whonix. Any chance that aptitude there is a
wrapper script which calls "aptitude update" first? (It sounds rather
unrealistic as I can't imagine a reason why anyone would do that, but
it's the only idea I have to explain your issue.)

> I just want aptitude to set all packages currently listed
> for auto removal to manually installed so they're kept.

I won't work that way. You first need to mark them with "unmarkauto"
otherwise the (default) setting "Remove unused packages automatically"
(Aptitude::Delete-Unused) kicks in immediately after "keep-all" has
been executed. So what you want is this command:

  aptitude unmarkauto '~M ~aremove'; aptitude keep-all

This marks all packages which are scheduled for auto-removal as
manually installed and afterwards the keep-all reverts the scheduled

		Regards, Axel
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

More information about the Aptitude-devel mailing list