Schlagworte: dpkg


Improving dpkg/apt performance

Thanks to Antti-Juhani Kaijanaho I could improve the performance of dpkg/apt on my old Ubuntu system (upgraded since I've started using Linux/Ubuntu in 2005):

I've written a small script, according to Antti-Juhani's post:

# via

if [ "$(id -u)" != "0" ]; then
echo "You must be root."
exit 1

dpkg --clear-avail
dpkg --forget-old-unavail

My results show that /var/lib/dpkg has gone from 195M down to 154M and calling apt-get upgrade (not a good test probably) went down from 10.024s to 5.764s (after dropping all caches, of course - "echo 3 | sudo tee /proc/sys/vm/drop_caches").


This should get considered to be done during Ubuntu upgrades.

By Daniel in Ubuntu, Snippets2009-05-08 English (EU) Email