Update - error: failed retrieving file 'community.db'

I don’t know much about regular expressions or ‘awk’ commands so I can only ask simple questions about this:

If a user were to use the 3 line sed command on a configuration that had only 2 lines
would the command fail ? or delete the 2 lines + third empty line?

Would it be possible to use the 3 line awk command with a 2nd awk command to remove the 3rd line if the line is empty?

Removal of community repository could have affected any system on any branch that had not removed [community] configuration from /etc/pacman.conf.

Most users on Testing and Unstable branches probably merged the .pacnew when it was first notified in 2023. - Testing Update 2023-06-15 - Known issues and solutions

New users on Stable branch (installed after Jul 2023) were not affected by this because [community] configuration was removed from later ISOs - But they are likely to have other issues in future if .pacnew files are not maintained

There were a few savyy users on forum that were spotting systems trying to sync to
community repo last year and suggesting users remove it

Manjaro had prior warning from Arch that they would be removing their community repo
so it was expected that some Manjaro users would have problems if Manjaro community

But I didn’t expect Manjaro tools would also fail when community repo was removed
( repo.manjaro.org and manjaro-check-repos )