2020년 9월 4일 금요일

How to refresh linux debian system with preserving Home, and installed packages.

 
At first, make the list of installed deb packages.

# apt-mark showmanual > $(backupdir)/installed_packages.txt
# cp /etc/apt/sources.list  $(backupdir)/

In my case, root partition separated with home partition.
So, I do reboot the system with bootable USB flash.
Then, cleaned up the root partition, and install it from USB flash.

Restore sources.list from backed up.

# cp $(backupdir)/sources.list /etc/apt/
# apt update

Finally, restore the packages as installed before.

# cat installed_packages.txt | xargs sudo apt install -y


댓글 없음:

댓글 쓰기