[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt or apt-get equivalent of 'aptitude --show-why upgrade'



On 2017-08-02 at 11:44, Christoph Groth wrote:

> Hi,
> 
> I'm running Debian testing and would like to upgrade from
> "oldtesting" (jessie) to current testing.  I noticed that 'apt
> upgrade' as well as 'apt-get upgrade' want to install the package
> 'pulsaudio' which I've been avoiding successfully so far.

That's a little weird. According to the apt-get man page, 'upgrade' will
never install a package which is not already installed.

The 'upgrade' command for apt behaves differently; that one will install
new packages if needed, but will never remove an existing package.

Are you certain that both commands produce the same install-new-package
result?

> I could of course uninstall pulseaudio after the upgrade, but I
> wonder whether a more elegant solution does not exist.

Try 'apt-get upgrade pulseaudio-'; the trailing hyphen should tell
apt-get to remove the package, which in this case means not installing
it. I more usually use this sort of thing with dist-upgrade, but AFAIK
it should work for upgrade as well.

You could also try something in /etc/apt/preferences along the lines of

Explanation: I don't want pulseaudio at all, ever.
Package: pulseaudio
Pin: version *
Pin-Priority: -1

but I can't swear that that will actually work properly.

> Specifically, aptitude has a '--show-why' option.  I checked that
> neither 'apt' nor 'apt-get' have an equivalent option.  Is there some
> other way to know why 'pulsaudio' is to be installed?

To the best of my knowledge, only aptitude supports the 'why'
capabilities. (I only knew about 'aptitude why', not about '--show-why',
but I expect the same will hold for both.)

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: