Archive for October, 2023

Reinstall the same apt packages after reinstall or on a new system

To save a list of installed apt packages on your Ubuntu system so you can reinstall them on another Ubuntu system, you can use the dpkg and apt commands to generate a package list and then transfer that list to the new system. Here are the steps:

  1. On the source Ubuntu system (the one with the packages you want to save), open a terminal.
  2. Run the following command to generate a list of installed packages and save it to a text file (e.g., package_list.txt):

bashCopy code

dpkg --get-selections > package_list.txt

This command will create a text file called package_list.txt in the current directory containing a list of all installed packages.

  1. Transfer the package_list.txt file to the target Ubuntu system. You can use methods like SCP, USB drive, or any other means to move the file to the new system.
  2. On the target Ubuntu system, open a terminal.
  3. Place the package_list.txt file in a directory of your choice.
  4. Run the following command to install the packages listed in the file:

sudo dpkg --set-selections < package_list.txt
sudo apt-get -y update
sudo apt-get dselect-upgrade

These commands will set the selections of packages based on the contents of the package_list.txt file and then update and upgrade your system to install those packages.

Please note that while this method will install the same packages on the new system, it won’t configure them in the same way as your original system. Configuration files for packages are typically not included in this process, so you may need to manually configure any software that requires it after the installation.

Additionally, if the two systems have different versions of Ubuntu or different package sources enabled, there may be some compatibility issues or differences in available packages. Always exercise caution and review the package list before proceeding to ensure that the packages are appropriate for the target system.

The Beginner’s Guide to the Neuro-biology of Drug Use

My reputation notwithstanding, I have rarely taken a substance that I haven’t researched. It’s hard to keep track of them (serotonin? dopamine? what?) and I was about to make a spreadsheet. Pro tip: if you think you need to do something like that, the odds approach certainty that someone else has already done the work.

Return top

Geek

I've seen things. Now I'm gonna write about them.