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

asked a year ago208 views
2 Answers
1

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

profile picture
EXPERT
answered a year ago
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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions