Skip to content

shingtoli/apt-list-to-preferences

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generate Ubuntu Preferences from APT list

Helper script to convert output from apt list into preferences file. This is used to lock an Ubuntu APT version to the exact setup used in another machine. After running the application, copy the preferences file to /etc/apt/preferences.

Depending on the pin-priority value, apt will prefer or demand the specific version listed.

Building from source

Install nvm and use node 12

nvm install 12
nvm use 12

Subsequently, only the following needs to be run

npm run build

Method 1. Generate directly from current system

Generate directly from current system with pin-priority of 1001

./aptpref -p 1001

Method 2. Generate from file

sudo apt list > apt_list.txt
./aptpref -f apt_list.txt -p 1001

About

Generate preferences from apt list output

Resources

Stars

Watchers

Forks

Packages

No packages published