top of page


Add old repositories on an Amazon Linux instance

This document is for an older version of the kernel installed.


OS: Amazon Linux AMI release 2016.09

Old kernel: kernel-4.4.35-33.55.amzn1.x86_64

New kernel : kernel-4.4.51-40.67.amzn1.x86_64

First, let's try to install by specifying the version with yum install.

[root@ip-xx-xx-xx-xx ~]# yum install kernel-4.4.51-40.67.amzn1.x86_64
Loaded plugins: priorities, update-motd, upgrade-helper
No package kernel-4.4.51-40.67.amzn1.x86_64 available.
Error: Nothing to do


This verification did not work.

This is because the package we wanted to install does not exist because it is referenced to the latest version in the Amazon repository.

The latest kernel version is 5.10.102-99.473.amzn2.x86_64 (2022-04-29)


There is a setting item called "releasever" in the yum configuration, which determines the repository to be referenced.

The default setting is ”latest” so that must be changed.

[root@ip-xx-xx-xx-xx ~]# vim /etc/yum.conf

Change the above settings and re-execute the yum that failed earlier.

[root@ip-xx-xx-xx-xx ~]# yum install kernel-4.4.51-40.67.amzn1.x86_64
 kernel.x86_64 0:4.4.51-40.67.amzn1

After restarting the server, check the kernel information.

[root@ip-xx-xx-xx-xx ~]# uname -r

The specified kernel has been installed.

Incidentally, the above method is also described in the AWS documentation.

In this way, if you want to install an older version, you can do so flexibly.

This blog post is translated from a blog post written on our Japanese website


bottom of page