▶ FIELD MANUAL // TOOLS N TOYS

# LINUX UNINSTALLATION

Comprehensive Guide to System Cleanup

## Quick Reference

Method | Identify | Command
--- | --- | ---
APT | `dpkg -l` | `sudo apt purge`
Flatpak | `flatpak list` | `flatpak uninstall`
Snap | `snap list` | `sudo snap remove`
AppImage | File location | Delete file

## 1. APT/DPKG Packages

BASH

    sudo apt remove package-name
    sudo apt purge package-name
    sudo apt autoremove --purge

## 2. Flatpak Applications

BASH

    flatpak uninstall org.example.App
    flatpak uninstall --delete-data org.example.App
    flatpak uninstall --unused

## 3. Snap Packages

BASH

    sudo snap remove package-name
    sudo snap remove --purge package-name

## 4. AppImages

1. Delete the AppImage file.
2. Remove `~/.local/share/applications/name.desktop`.
3. Clean `~/.config/app-name/`.

## 5. Tarball Extracts

    sudo rm -rf /opt/package-name/
    rm -rf ~/.local/package-name/
    sudo rm /usr/local/bin/package-name

## 6. Source Builds

    cd path/to/source/
    sudo make uninstall

If no uninstaller exists, use `checkinstall` for future tracking.

## 7. Scripts

Identify install location from the script source, then manually remove binaries and data.

## System Cleanup

BASH

    sudo apt clean
    sudo journalctl --vacuum-time=7d
    rm -rf ~/.cache/thumbnails/*

## Nuclear Options

Only use if the system is severely corrupted. Reset package manager locks:

    sudo rm /var/lib/dpkg/lock
    sudo dpkg --configure -a