existing ubuntu ec2 instance that has data should look like new server, after deleting everything

0

my question is i have got an existing Ubuntu ec2 instance that has got DNS mapping and setup. I need to delete of all the installation with files and folders and make it look like a fresh server. so how can i approch it

已提問 1 年前檢視次數 215 次
2 個答案
1

Any reason why you can’t create a new instance so it’s fresh and terminate the old one?

profile picture
專家
已回答 1 年前
0

Hello

Assuming this instance needs to be publicly accessible and is configured without a load balancer or an elastic IP. I don't believe that there is a straightforward way to achieve a clean installation state. However, I would recommend the following

  1. Uninstall all the software using apt purge
  2. Use apt autoremove to remove any unused package
  3. Remove any user directories/log files
  4. If ssh multiple SSH keys are configured, remove the keys from authorized_hosts

Hope this helps.

profile picture
Bisina
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南