AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Debian list installed packages9/14/2023 ![]() [[ "$):\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) A list of installed packages appears if it has been. var/log/apt/history.log* | grep Start-Date | sed | sort -d | head -n 1 )" # find earliest log entry (zgrep handles gzipped and uncompressed input) In your terminal window or Anaconda Prompt, run the command conda list. If, for some reason, you needed to rebuild your server, you would need to reproduce exactly what you had installed before, which can be a pain. As you maintain your server, your list of installed packages will grow. A little hacky and there may be undiscovered exceptions, but it works on Debian 11 and Mint 20. Backing up and restoring Debian packages. ![]() Wrote this script to replay the apt history logs, producing a list of what was installed manually and is still installed.
0 Comments
Read More
Leave a Reply. |