Ubuntu 软件包备份与清理

备份

1
sudo tar cizvf backup.tar.gz /var/cache/apt/archives --exclude=/var/cache/apt/archives/partial/* --exclude=/var/cache/apt/archives/lock

清理

1
2
sudo apt-get clean
sudo rm -rf ~/.thumbnails/fail/gnome-thumbnail-factory/*

还原

1
2
sudo apt-get update 
sudo tar xzvf backup.tar.gz -C /
坚持原创技术分享,您的支持将鼓励我继续创作!