After switching to drupal 8, few OS updates later and using drush (vendor/bin/drush) as part of each drupal 8-9 daily project routine. I realized that (global) drush was broken when i had to run some all time classic drush up and drush rr all and drush updb commands to a few drupal 7 websites that needed some major updates. So long story short: I removed my old veteran drush installation and this is how i reinstalled drush 7 for my good old drupal 7 projects.
In order to follow this example you need to have composer already installed. Last but not least you do not want to install the latest drush master version of course. So for installing drush7 go to https://github.com/drush-ops/drush/tree/7.x and get the download link URL from the Code button (https://github.com/drush-ops/drush/archive/refs/heads/7.x.zip)
# Create a bin directory for your user account and add to system path mkdir $HOME/bin echo "PATH=$HOME/bin:$PATH" >> ~/.bashrc source ~/.bashrc # Download and unzip the Drush software wget -O $HOME/bin/drush.zip https://github.com/drush-ops/drush/archive/refs/heads/7.x.zip unzip -d $HOME/bin $HOME/bin/drush.zip # Install Drush dependencies with Composer (assumes `composer` is on system PATH) cd $HOME/bin/drush-7.x composer install # Create a symbolic link ln -s $HOME/bin/drush-7/drush $HOME/bin/drush