🌟
z's
  • Hello
  • Cheatsheets
    • 🍂Docker Compose Services
    • 🌿Git
    • ▶️ Golang
      • Gotchas
    • ⛑️Helm
    • ☸️ Kubernetes Management
    • ☸️ Kubernetes Resources
    • ☸️Kubernetes Snippets
    • 🔨Tools Quicklinks
    • Tools and Useful Stuff
    • 🟠Using Ubuntu
    • Reference/Template Dockerfiles
  • How-Tos
    • Use Ubuntu
    • Use VSCode
    • Use AWS
    • Use Git
    • Use GPG keys
    • Use Digital Ocean
  • About Me
    • Want to work with me?
    • How to work with me
  • Useful Tools
    • Collaboration
      • Miro
    • Documentation
      • Gitbook
      • Notion
  • On Growing People
    • Ontological Coaching
    • Organization Development (OD)
    • Speech Acts
    • Books & Other Resources
  • On Creating Software
    • Product
    • Design
    • Development Environments
      • Introduction
      • Visual Studio Code/Codium
      • Public Key Infrastructure (PKI) Setup & Usage
    • Patterns
      • API Authentication
      • User Authentication
    • Languages/Formats
      • JavaScript
      • Golang
      • HTML
      • CSS
      • SQL
      • JSON
      • YAML
    • Code Logistics
    • Data Persistence
      • Cassandra
    • Software Architecture
    • System Observability
    • Cool Tools
    • Kubernetes
      • Resource Cheatsheet
      • 1/ Kubernetes in 5 Minutes
      • 2/ Setting up Kubernetes locally
      • 3/ Handling long-running workloads
      • 4/ Handling run-once workloads
Powered by GitBook
On this page
  • Hardware Management
  • View all USB devices
  • Unmount USB drive
  • Upgrading Ubuntu major versions
  • From docker
  • From journalctl
  • From snapd

Was this helpful?

  1. How-Tos

Use Ubuntu

Hardware Management

View all USB devices

sudo lsusb

Unmount USB drive

# check available disks
sudo fdisk -l

# check mount points and find mount point of disk you want to unmount
sudo lsblk

# do the unmount (/path/to/mount is the path of the mount)
sudo umount /path/to/mount
# or using the path to the device instead, do
sudo udisksctl unmount -b /dev/sdx

# safely eject the device (/dev/sdx is the path to the device)
sudo udisksctl power-off -b /dev/

Upgrading Ubuntu major versions

Run the following to trigger the upgrade via a GUI (remove -f if you wanna be hardcore)

sudo do-release-upgrade --allow-third-party -f DistUpgradeViewGtk3

From docker

Run the following to clear space used by the Docker daemon:

# remove dangling images
docker prune images;

# removed unused containers
docker prune containers;

# remove unused volumes
docker prune volumes;

From journalctl

Run the following to clear space from /var/log/journal:

sudo journalctl --rotate
sudo journalctl --vacuum-time=1d

From snapd

Run the following to clear space from /var/lib/snapd/cache/*:

sudo rm /var/lib/snapd/cache/*

Run the following to clear space from /var/lib/snapd/snaps/*:

snap list --all | while read snapname ver rev trk pub notes; do if [[ $notes = *disabled* ]]; then snap remove "$snapname" --revision="$rev"; fi; done
PreviousReference/Template DockerfilesNextUse VSCode

Last updated 3 years ago

Was this helpful?