A command-line tool to list packages currently installed that were explicitly installed by the user
manual-pkgs parses files that are generally found in the following file paths:
/var/lib/dpkg/status/var/lib/apt/extended_states/var/log/apt/history.log
It then uses the information found in those files to determine what packages are currently installed and which were manually installed by the user rather than installed automatically by the system, or as dependencies of other packages.
You can install manual-pkgs in two ways:
- Downloading the prebuilt
.debfile from the Releases page and picking the latest release. - Building the package yourself.
- Go to the package's Releases page
- Download the latest
.debfile - Install it using this command:
dpkg -i manual-pkgs_*.deb
- First, clone the repository on your computer:
git clone https://github.com/jakeymac/manual-pkgs.git
- Make sure the build script is executable:
cd manual-pkgs chmod +x build.sh - Now build the .deb package using the build script:
./build.sh
- Install the package using the generated .deb file:
dpkg -i dist/manual-pkgs_*.deb
Here are the optional flags for the manual-pkgs tool:
| Option | Description |
|---|---|
-v, --verbose |
Enable verbose output with package counts from each source |
-o FILE, --output FILE |
Save the package list to a specified file |
--status PATH |
Path to a dpkg status file |
--extended PATH |
Path to a apt extended states file |
--history-logs PATHS |
One or more paths to apt history logs |
The manual-pkgs tool uses these system files by default:
/var/lib/dpkg/status/var/lib/apt/extended_states/var/log/apt/history.log
# Display all manually installed packages
manual-pkgs
# Verbose mode
manual-pkgs -v
# Output results to a file
manual-pkgs --output packages.txt
# Use a custom file path for extended states
manual-pkgs --extended /custom/path/extended_states
# Use custom file paths for history logs
manual-pkgs --history-logs /custom/path/history.log /custom/path/history.log.1This project is licensed under the MIT License.
You are free to use, modify, and distribute it with proper attribution.