[[ "$):\n$( echo | tr ' ' '\n' | sort -u )" # display sorted listĮcho -e "\nInstallation paste:\n\napt install$( echo | sed -r )" # display command to install (e.g. Zgrep -h Requested /var/log/apt/history.log* -B 2 \ # reduce to date, action, and programs only # separate individual actions using grep's group separator, compress spaces, remove starting text # select only relevant operations and preceding line (date) # select any operations *requested*, plus precededing two lines (date and command) var/log/apt/history.log* | grep Start-Date | sed | sort -d | head -n 1 )" # find earliest log entry (zgrep handles gzipped and uncompressed input) A little hacky and there may be undiscovered exceptions, but it works on Debian 11 and Mint 20. While apt upgrade is useful for updating the installed packages. Wrote this script to replay the apt history logs, producing a list of what was installed manually and is still installed. Create a new server, choosing Debian 11 as the operating system with at least 2GB RAM.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |