Linux Bash: How To Quickly Backup And Reinstall A Set Of Packages
Join the DZone community and get the full member experience.Join For Free
// description of your code here How to quickly backup and reinstall a set of packages after a crash, mistake.
dpkg --get-selections | grep -v deinstall > ~/InstalledPackages.list grep -ve ^# -e ^$ /etc/apt/sources.list > ~/InstalledSources.list dpkg --set-selections < ~/InstalledPackages.list
Backup Linux (operating system) Bash (Unix shell)
Opinions expressed by DZone contributors are their own.