how to upgrade ubuntu tzdata 2023d to 2024a?

My Environment

  • Ubuntu 22.04

What I want to do

I want to upgrade ubuntu tzdata 2023d to 2024a.
(I’m trying to install edgedb and edgedb depends on it

root@when2meet:~# apt-get install edgedb-4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 edgedb-server-4 : Depends: tzdata (>= 2024a-0ubuntu0.22.04) but 2023d-0ubuntu0.22.04 is to be installed
E: Unable to correct problems, you have held broken packages.

What I did

root@when2meet:~# sudo apt upgrade tzdata
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
tzdata is already the newest version (2023d-0ubuntu0.22.04).
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python-babel-localedata python3-babel python3-certifi python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe python3-pyrsistent
  python3-requests python3-tz python3-urllib3
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
  linux-generic linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
root@when2meet:~# sudo apt list -a tzdata
Listing... Done
tzdata/jammy-updates,now 2023d-0ubuntu0.22.04 all [installed]
tzdata/jammy-security 2023c-0ubuntu0.22.04.0 all
tzdata/jammy 2022a-0ubuntu1 all

The question

how do I upgrade the tzdata?

Asked By: Jerry


tzdata 2024a is provided by the jammy-security repository which provides security updates for Ubuntu 22.04. Before you run the next command you can try running cat /etc/apt/sources.list to check whether a line that says deb jammy-security main restricted universe multiverse already exists in your sources.list file.

In order to upgrade tzdata package to 2024a in Ubuntu 22.04 enable the jammy-security repository in /etc/apt/sources.list by running the following command.

sudo add-apt-repository "deb jammy-security main restricted universe multiverse"

This command does not add any new repositories for main, restricted, universe, or multiverse, but only adds the jammy-security repository.

After enabling the jammy-security repository, run the following commands to upgrade tzdata to 2024a:

sudo apt update && sudo apt upgrade
sudo apt install tzdata

Results of apt policy tzdata after running these commands:

  Installed: 2024a-0ubuntu0.22.04
  Candidate: 2024a-0ubuntu0.22.04
Answered By: karel
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.