I recently did a clean install of ubuntu 24.04 server. Previously I had been running ubuntu server 18.04. Before I did the clean install of ubuntu 24.04 I exported the list of packages I had installed to a file called installed_packages.txt. It has entries like the example below. I would like to try to install all the packages in the installed_packages.txt file in my new ubuntu server 24.04 and save a list of any packages that failed to be installed in a new file called failed_install.txt. Is there a way I can install packages in ubuntu server 24.04 server from a text file like the installed_packages.txt file? For example is there some command I could run in terminal?
example installed_packages.txt:
accountsservice install
acl install
acpid install