Notes:

Basics


  • sudo adduser "newusername"
  • sudo usermod -aG sudo "newusername"
  • sudo deluser --remove-home "username"

  • sudo nano /etc/netplan/*.yaml
  • sudo hostnamectl set-hostname "new hostname"
  • sudo nano /etc/hosts


Remove PG 15 prior to re-install ( if required )

  • dpkg -l | grep postgres
  • sudo apt --purge remove postgresql postgresql-15 postgresql-client-15 postgresql-client-common postgresql-common postgresql-contrib pgdg-keyring
    remove directories when purged Y/n = Y
  • dpkg -l | grep postgres ( verify pg has been removed )
  • sudo rm -rf /var/lib/postgresql/
  • sudo rm -rf /var/log/postgresql/
  • sudo rm -rf /etc/postgresql/
  • sudo deluser postgres
  • sudo apt autoremove