下面的命令移除系统不再需要的依赖库和软件包。这些软件包是自动安装的,以使一个安装的软件包满足依赖关系。同样,它也会移除安装在系统中的 Linux 旧内核。它会移除不再被系统需要的孤儿软件包,但是不会清除它们。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ sudo apt-get autoremove [sudo] password for daygeek: Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: apache2-bin apache2-data apache2-utils galera-3 libaio1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libjemalloc1 liblua5.2-0 libmysqlclient20 libopts25 libterm-readkey-perl mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server-10.1 mariadb-server-core-10.1 mysql-common sntp socat 0 upgraded, 0 newly installed, 25toremoveand23 not upgraded. After this operation, 189 MB disk space will be freed. Do you want tocontinue? [Y/n]
为清除它们,可以与命令一起使用 --purge 选项。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ sudo apt-get autoremove --purge Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: apache2-bin* apache2-data* apache2-utils* galera-3* libaio1* libapr1* libaprutil1* libaprutil1-dbd-sqlite3* libaprutil1-ldap* libconfig-inifiles-perl* libdbd-mysql-perl* libdbi-perl* libjemalloc1* liblua5.2-0* libmysqlclient20* libopts25* libterm-readkey-perl* mariadb-client-10.1* mariadb-client-core-10.1* mariadb-common* mariadb-server-10.1* mariadb-server-core-10.1* mysql-common* sntp* socat* 0 upgraded, 0 newly installed, 25toremoveand23 not upgraded. After this operation, 189 MB disk space will be freed. Do you want tocontinue? [Y/n]