dpkg, APT & Aptitude commands

  • List all installed packages:
    dpkg -l
    
  • List all recently installed packages:
    zcat -f /var/log/dpkg.log* | grep "\ install\ " | sort
    
  • Install a package from a lower-priority repository, like the backport repository:
    apt-get -t squeeze-backports install my-package
    
  • Force reinstallation of a package:
    apt-get -d --reinstall install my-package
    dpkg --install --force-confmiss /var/cache/apt/archives/my-package.deb
    
  • Clean aptitude local cache:
    apt-get clean
    
  • Uninstall a package throughly (both program files and configuration):
    apt-get remove --purge my_package
    
  • Force removal of a package while ignoring all dependencies:
    dpkg --remove --force-depends libsomething
    
  • Remove orphaned pakages:
    deborphan | xargs apt-get -y remove --purge
    
  • Show the changelog of a package (here, the linux kernel of Ubuntu):
    aptitude changelog linux-generic
    
  • Which package contain a given file:
    apt-file search file_to_search
    
  • Get the list of files of a package:
    apt-file list package_name
    
  • Remove dpkg lock file:
    rm /var/lib/dpkg/lock
    
  • Hold a package with either dpkg or aptitude:
    echo "kdenlive hold" | dpkg --set-selections
    
    aptitude hold kdenlive
    
  • Unhold a package:
    echo "kdenlive install" | dpkg --set-selections
    
    aptitude unhold kdenlive
    
  • List holded packages:
    dpkg --get-selections | grep hold
    

Amarok 1.4.9.1 for Mandriva 2008.1

Amarok 1.4.9.1 logo Amarok 1.4.9.1 was released 6 weeks ago and was backported to Mandriva 2008.1 some times after. Usually I wait the “official” backport to rebuild the RPM with some extra features and add it to my personnal repository.

But this time it’s different: for Mandriva 2008.1, all the features I added to my builds (especially the full SQLite, MySQL and Postgresql database support) are now included in the “officialy” backported RPM. So starting from Mandriva 2008.1, you don’t need my Amarok backports. All you need is the love from the official backport repository (FTP URL given above). I’m happy as this mean more free time for me and less things to maintain ! ;)