How do you export a comprehensive list of installed packages?

0
8
Asked By CuriousVibes42 On

I'm working on a short script to help me export all my installed packages so I can easily reproduce my setup later. Here's what I have so far:

```bash
# System Packages
# apt list --installed > apt.list
# pacman -Qe > pacman.list
rpm -qa > rpm.list
# Special package managers
flatpak list --system --app --columns=application | tail -n+1 | sort -u > flatpak.list
brew list -1 --installed-on-request > brew.list
npm list --global --depth=0 > node.npm.list
pnpm list --global --depth=0 > node.pnpm.list
pip list --not-required > python.pip.list
gem list > ruby.gem.list
pipx list --global --short
# Desktop plugins
gnome-extensions list --user --active > gnome.ext.usr.list
gnome-extensions list --system --active > gnome.ext.sys.list
# Containers
sudo podman images --format {{.Repository}}:{{.Tag}} > podman.img.list
```

Did I miss anything important? How do you handle this kind of task?

2 Answers

Answered By OldSchoolSysAdmin77 On

I prefer to have a curated list of essential packages for fresh installs. I install non-essentials only when I actually need them. It feels great to ditch outdated software and rediscover what's current. Plus, it makes the transition to new systems much smoother!

SimplicityIsKey12 -

Totally agree! I use two bash scripts for setup—one for all setups including VPS and the other for GUI systems. It sets everything up effortlessly! Keeping things minimal helps immensely, and I always back up my dotfiles.

Answered By TechSavvyDude95 On

That’s a cool approach! You might want to add this command to clean up any empty .list files afterwards:

```bash
find . -iname "*.list" -empty -delete
```

It helps keep things tidy!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.