数据库
首页 > 数据库> > sql-server – 如何在Ubuntu上完全删除SQL Server 2017?

sql-server – 如何在Ubuntu上完全删除SQL Server 2017?

作者:互联网

docs有关于如何删除SQL Server的说明.然而,这留下了某些包裹.如何删除所有跟踪并卸载SQL Server 2017?

解决方法:

这些实际上是关于如何删除Microsoft SQL Server的非常糟糕的说明.

SQL Server安装这些关联的包.

mssql-server
mssql-server-fts
mssql-tools
msodbcsql
unixodbc-dev

假设您希望完全删除SQL Server,您应该这样做

# Stop the service
systemctl stop mssql-server.service

sudo add-apt-repository --remove "$(curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list)"

# Remove those packages from the system.
sudo apt-get --purge remove mssql-server mssql-server-fts mssql-tools msodbcsql unixodbc-dev

# Delete the SQL Server repositories
sudo rm /etc/apt/sources.list.d/mssql-* /etc/apt/sources.list.d/msprod*

# Remove the Microsoft keys.
apt-key del "BC52 8686 B50D 79E3 39D3  721C EB3E 94AD BE12 29CF"

# Delete the Microsoft created directories
sudo rm -rf /var/opt/mssql/ /opt/{microsoft,mssql-tools,mssql}/ /usr/share/doc/{msodbcsql,mssql-server,mssql-tools}

标签:sql-server-2017,sql-server,linux,ubuntu,installation
来源: https://codeday.me/bug/20190805/1588387.html