apt-get undo

Problem: after updating system with apt-get upgrade a programm will not work anymore because of dependency-problems.
Solution: downgrade a package
Steps:

  • find last installed version of the package, e.g. look at install trace:
    ...
    Preparing to replace package VERSION (using .../package_NEWVERSION_i386.deb) ...
    ...
  • if no apt-get clean was done the old package is still stored in the system, look at /var/cache/apt/archives/ otherwhise look at http://snapshot.debian.net/archive/ for an older package version (a look at the debian archive will show you since when the new version was integrated in debian, so you have a clue for searching http://snapshot.debian.net)
  • after one has found the „old“ package it can be installed with: dpkg -i package_OLDVERSION_i386.deb
  • to prevent the update of this package in funture by apt-get upgrade, set the package status to hold:
    echo package "hold" | dpkg --set-selections

Sync iTunes Library

Problem: 2 macs, 2 times itunes, backup itunes music library from one mac to the other:

  • first,quit iTunes on the slave machine and delete library files:
    rm -rf Previous iTunes Libraries rm iTunes Library rm iTunes Music Library.xml
  • second, rsync the MP3s:
    christian@master rsync -ravz --delete "/Users/christian/Music/iTunes/iTunes Music" christian@slave:/Path/to/Library/Music/iTunes/
  • finally, copy iTunes Music Library.xml from master to slave:
    scp "iTunes Music Library.xml" christian@slave:~/Music/iTunes/ scp "iTunes Music Library" christian@slave:~/Music/iTunes/
  • alternatively, if you don´t use the same directory on master and slave for storing the MP3s, do these steps:


    scp „iTunes Music Library.xml“ christian@slave:~/Music/iTunes/tmp.xml slave:~/Music/iTunes cat tmp.xml | sed ’s/\/Users/christian/\/New\/Path/‘ > „import.xml“

    open iTunes at slave and import import.xml

Java 1.5 on OS X 10.4.5

After installing Java 1.5 on OS X with one has to activate it. This can be done by doing the following tasks:
cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo rm Current
sudo rm CurrentJDK
sudo ln -s 1.5 Current
sudo ln -s 1.5 CurrentJDK