![一旦使用过 debconf-set-selections 值,它是否会自动从 debconf 数据库中删除它们?](https://linux22.com/image/692990/%E4%B8%80%E6%97%A6%E4%BD%BF%E7%94%A8%E8%BF%87%20debconf-set-selections%20%E5%80%BC%EF%BC%8C%E5%AE%83%E6%98%AF%E5%90%A6%E4%BC%9A%E8%87%AA%E5%8A%A8%E4%BB%8E%20debconf%20%E6%95%B0%E6%8D%AE%E5%BA%93%E4%B8%AD%E5%88%A0%E9%99%A4%E5%AE%83%E4%BB%AC%EF%BC%9F.png)
考虑以下打字稿:
# export DEBIAN_FRONTEND="noninteractive"
# sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/remove-data-dir boolean true"
# echo GET mysql-community-server/remove-data-dir | debconf-communicate
0 true
# apt purge mysql-*
...
# echo GET mysql-community-server/remove-data-dir | debconf-communicate
10 mysql-community-server/remove-data-dir doesn't exist
# sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password 123456"
# sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password 123456"
# echo GET mysql-server/root_password | debconf-communicate
0 123456
# apt install mysql-server-5.6
...
# echo GET mysql-server/root_password | debconf-communicate
0
那么,debconf-set-selections
这是自动完成的吗?还是安装脚本会执行此操作?还有其他选择吗?