How to re-enable FTP on secondary Ubuntu/Debian server to pull updates from Main Linux Server with Mirrored depository?

updated both my Linux servers to Ubuntu 19.10 and the latest version of Debian which both are pointing to my main Linux Server running a Mirrored depository and allows communications to it via FTP, and now I am receiving message stating

The method 'ftp' is unsupported and disabled by default. 
Consider switching to http(s). 
Set Dir::Bin::Methods::ftp to "ftp" to enable it again.

after failing to fetch ftp://. How can I re-enable the retrieval of system update via FTP?


Solution 1:

On the command line run

echo 'Dir::Bin::Methods::ftp "ftp";' | sudo tee -a /etc/apt/apt.conf.d/99local-ftp

This will create a config file named 99local-ftp (you may choose another name if you want) in folder /etc/apt/apt.conf.d/ that contains the line

Dir::Bin::Methods::ftp "ftp"

This will re-enable FTP for apt.