When I ran apt-get update, I got the error "...repository... does not have a Release file" [duplicate]

When I run apt-get update, I get the following error message:

error:8 http://ppa.launchpad.net/mc3man/xerus-media/ubuntu hirsute Release
  404  Not Found [IP: 91.189.95.85 80]

error:9 http://archive.ubuntu.com/ubuntu trusty/main arm64 Packages
  404  Not Found [IP: 91.189.88.142 80]

E: The repository 'http://ppa.launchpad.net/mc3man/xerus-media/ubuntu hirsute Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Solution 1:

The PPA https://launchpad.net/~mc3man/+archive/ubuntu/xerus-media does not have a package for hirsute. It was last updated 3 years ago.

About the following error,

error:9 http://archive.ubuntu.com/ubuntu trusty/main arm64 Packages 404 Not Found

How did you get trusty (14.04) repository in 21.04? Mixing repositories in this way can break your installation.

You can remove the ppa with sudo add-apt-repository --remove ppa:mc3man/xerus-media, and remove the trusty repo from /etc/apt/sources.list to fix these error messages.