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
  • du -cha --max-depth=1 / | grep -E "M|G"
  • apt-get install qemu-guest-agent


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

  • sudo pg_ctlcluster 15 main stop
  • 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