manywaypark's Blog
개발, 검색, 함수

Ubuntu(Debian) package 관리

tips & tricks/Linux/Unix 2013. 10. 4. 10:16 by manywaypark

박스 A에 설치된 package들을 박스 B에도 그대로 적용하고 싶을 때:

설치 패키지 정보 복사 및 설치:

# box A:

$ dpkg --get-selections > selections.txt

$ scp selections.txt foo@boxB:/tmp/

# box B:

$ dpkg --set-selections < /tmp/selections.txt

$ sudo aptitude install                       # 설치

$ sudo apt-get -u dselect-upgrade


위와 같이하면 설치는 되지만, 의존성 관련 정보(사용자가 깔았는지, 의존성때문에 자동으로 깔렸는지) 등은 소실된다.

이 정보의 복구는 다음과 같이 한다.

# box A:

$ apt-mark showauto > pkgs_auto.lst

$ apt-mark showmanual > pkgs_manual.lst

# box B:

$ sudo apt-mark auto $(cat pkgs_auto.list)

$ sudo apt-mark manual $(cat pkgs_manual.list)


ref: http://askubuntu.com/questions/101931/restoring-all-data-and-dependencies-from-dpkg-set-selections


happy hackin'

분류 전체보기 (306)
잡담 (20)
함수형 언어 (65)
emacs (16)
java (18)
tips & tricks (154)
사랑 (1)
가사 (0)
독서 (4)
mobile (6)
비함수형 언어 (2)

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

04-20 04:50