[Solved] Termux Package Management Issue

Brief: Today you will learn the cause of the Termux package management issue, how to solve it, and other ways to solve it.

If you have installed the Termux app from the Playstore, you might face the below error while upgrading or installing the package on an Android device.

[*] Running apt update
Ign:2 https://dl.bintray.com/grimler/game-packages-24 games InRelease
Hit:1 https://packages.termux.dev/apt/termux-main stable InRelease          Ign:3 https://dl.bintray.com/grimler/science-packages-24 science InRelease
Err:4 https://dl.bintray.com/grimler/game-packages-24 games Release           502  Bad Gateway
Err:5 https://dl.bintray.com/grimler/science-packages-24 science Release
  502  Bad Gateway                                                          Reading package lists... Done
E: The repository 'https://dl.bintray.com/grimler/game-packages-24 games Release' does not have a Release file.
N: Metadata integrity can't be verified, repository is disabled now.
N: Possible cause: repository is under maintenance or down (wrong sources.list URL?).
E: The repository 'https://dl.bintray.com/grimler/science-packages-24 science Release' does not have a Release file.
N: Metadata integrity can't be verified, repository is disabled now.
N: Possible cause: repository is under maintenance or down (wrong sources.list URL?).

What is the Cause of Package Command Errors in Termux?

The cause of this error is Termux build you’ve installed from the Playstore is no longer supported. Termux officially provides its latest version on Github and F-droid. However, it is listed on the Playstore with an older version (v0.101), which is not recommended.

Termux (v0.118.0) moved the primary Termux package repository hosting from Bintray to Fosshost because the Bintray repository shut down on May 1st, 2021, which caused problems for users when running package installation and running the update command with pkg or apt commands.

Below is the error you may find while upgrading or installing packages.

E: The repository 'https://termux.org/packages stable Release' does no longer have a Release file.
N: Metadata integrity can't be verified, repository is disabled now.
N: Possible cause: repository is under maintenance or down (wrong sources.list URL?).
E: The repository 'https://dl.bintray.com/grimler/game-packages-24 games Release' does not have a Release file.
N: Metadata integrity can't be verified, repository is disabled now.
N: Possible cause: repository is under maintenance or down (wrong sources.list URL?).
E: The repository 'https://science.termux-mirror.ml science Release' does not have a Release file.
N: Metadata integrity can't be verified, repository is disabled now.
N: Possible cause: repository is under maintenance or down (wrong sources.list URL?).

How to Solve Package Command Errors in Termux

There are two different ways to solve this error. The first is by changing the mirror from the main repository to a different Termux Mirror. And second is removing the unused repository.

Solution 1: Changing the Main Repository to a Different Termux Mirror

Execute the below command in your Termux app to change the main repository to a separate mirror.

Note: If you have installed other package repositories, like x11 and root, then you must select and change those mirrors as well.

$ termux-change-repo

By default, the Main repository will be selected. Don’t change anything, just click on the OK button.

termux-change-repo
termux-change-repo

Here, the official repositories will be selected, but you can change it to Mirrors by BFSU or something else. And then click on the OK button.

Changing the Main Repository to a Different Termux Mirror
Changing the Main Repository to a Different Termux Mirror

Now it will automatically start the upgrade process. Otherwise, run the pkg upgrade command to update all packages to the latest available versions. If you face the same error, then follow solution 2.

Solution 2: Removing the Unused Repository in Termux

If you are using the older version of Termux, it might still use the science and game repositories that have been merged into the main repository.

If you have them installed, execute the following command to remove them.

$ apt remove science-repo game-repo

Below is the output of the above command.

Removing the Unused Repository
Removing the Unused Repository

I hope one of these solutions will resolve your Termux package management issue. However, if the error still persists, feel free to contact us in the comment section.

Leave a Reply