Skip to content

Instantly share code, notes, and snippets.

@axlroden
axlroden / reinstall_VPS_from_inside.txt
Last active July 25, 2023 12:53 — forked from 4abhinavjain/reinstall_VPS_from_inside.txt
DIY install debian on Oracle Cloud Infrastructure ( Free Tier ) - ARM64
sudo -i
sudo apt update && sudo apt dist-upgrade -y && sudo apt install lsof && sudo reboot
# ssh back in
sudo -i
snap remove --purge oracle-cloud-agent && sudo snap remove --purge core18
apt purge -y $(dpkg-query -Wf '${Package}\n' | grep header) $(apt list --installed | grep -oP "^linux.*\d\d\d\d-oracle" | grep -v "$(uname -r)") linux-modules-extra-$(uname -r) lxc* lxd* vim* && sudo apt -y autoremove && sudo apt -y autoclean && apt -y clean
rm -rf /var/log/* /var/lib/apt/lists/*
@axlroden
axlroden / reinstall_VPS_from_inside.txt
Created July 25, 2023 12:28 — forked from 4abhinavjain/reinstall_VPS_from_inside.txt
DIY install debian on Oracle Cloud Infrastructure ( Free Tier ) - ARM64
# should works on any cloud-init enabled hypervisor (openstack.. )
# start from a normal ubuntu 20.04 install as minimal was not available for ARM64
# Since ARM64 machines has higher RAM, Shrinking is desired but not necessary. Instead we will increase tmpfs to 1700MB
# Getting root (if sudo -i doesn't work then set a root password beforehand using 'sudo passwd root'
sudo -i
# make sure we are on the highest kernel, so we can delete all the others ...