For example,

sudo apt-get source bash

downloads the source code for the latest bash package version (5.0). How do I get the source code for an older version of the package (e.g. 4.3).

Is there some wat to specify version in the 'apt-get source' command or any other commands?


You can download the source from the GNU directory:

wget https://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz

Using apt it will download the current available version in Ubuntu repositories.

By adding Xenial source repository , you can download the 4.3-14 :

printf "deb-src http://security.ubuntu.com/ubuntu xenial-security main" |\
sudo tee /etc/apt/sources.list.d/xenial-src.list
sudo apt update
apt source bash=4.3-14ubuntu1.4

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.