Ubuntu: apt-get upgrade doesn't upgrade bash — so why the bash reinstallation is an upgrade?



Question:

apt-get upgrade doesn't upgrade bash from 4.3 to 4.4. Thus it seems from bash --version),

so why the bash reinstallation is an upgrade?

apt-get install --only-upgrade bash  

Or it's just a weird terminology for saying "reinstall only Bash".


Solution:1

You can check what upgrades that can be expected with the following command

apt-cache policy bash  

I run Ubuntu 16.04 LTS, and the output is

bash:    Installed: 4.3-14ubuntu1.2    Candidate: 4.3-14ubuntu1.2    Version table:   *** 4.3-14ubuntu1.2 500          500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages          500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages          100 /var/lib/dpkg/status       4.3-14ubuntu1 500          500 http://se.archive.ubuntu.com/ubuntu xenial/main i386 Packages  

In other words, there is no newer version of bash in the repository for 16.04 alias xenial. This is the reason why it will not be upgraded.

Normally there is no reason to upgrade a program package in a case like this, but it is possible, if you can find a newer version, for example via a PPA.


Solution:2

apt-get install --only-upgrade <package>  

doesn't reinstall a package, it just upgrades only the specified package and only if it is installed, see man apt-get:

--only-upgrade
Do not install new packages; when used in conjunction with install, only-upgrade will install upgrades for already installed packages only and ignore requests to install new packages.

As the Xenial repositories only ship bash 4.3 it won't get updated by apt. Sure you could install bash 4.4 manually, but it's not a good idea at all to fiddle with a core program as essential as bash.

If you really need to upgrade bash I recommend the following approach:

sudo at 27.04.2018 update-manager --proposed  

This will upgrade your system to Ubuntu 18.04 on April 27, 2018 and on the way update bash to version 4.4-5. Of course I'm not entirely serious here, but updating Ubuntu is actually the way to go if you urgently need bash 4.4.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »