7

I'm working on Ubuntu 14.04 and I found something that I can't understand.

I execute the commands as below:

apt update && apt list --upgradable

I've found that bash is in the upgradable list.

For now the output of bash --version tells me that the version of bash is 4.3.11(1).

Then I do apt upgrade.

To my surprise, I do bash --version again and the output doesn't change at all. The version of bash is still 4.3.11(1).

So is this normal?, Some package can be upgradable while its version doesn't change?

2
  • 5
    Does the same thing happen after you logout and login again?
    – karel
    Feb 1 '18 at 8:50
  • @karel asked because if you didn't open a new instance of bash, the old one would still be running and report the old version number. Linux keeps things around and alive when they are running even if the underlying files are changed (by hanging on to the original inode and sometimes keeping things in memory). I see this when one of my browsers gets an update while it's running. It still reports (and is) the old version until I close and reopen it.
    – Joe
    Feb 8 '18 at 4:58
13

You should also check the package version:

$  bash --version
GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ apt-cache policy bash | head -n3
bash:
  Installed: 4.4-5ubuntu1~16.04.york0
  Candidate: 4.4-5ubuntu1~16.04.york0

As can be seen, the package and bash version strings have differences, as they're set by different people. In your case it might well be the case that nothing changed upstream, and changes were entirely by the package maintainer, so bash --version remains unchanged, but the package version changed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.