如何在Linux中不使用rpm和yum命令列出全来源的近期安装软件
Got it, since you want to track recently installed software without relying on rpm/yum (which only cover packages they handled), here are several practical approaches that cover different installation sources across most Linux distros:
1. Check system-wide package manager logs
Most distros log package operations outside of rpm/yum, so you can tap into those:
- For Debian/Ubuntu-based systems: Dpkg logs every install, even if you used
apt. Run this to see recent entries:grep "install " /var/log/dpkg.log | tail -20 - For Arch-based systems: Pacman keeps detailed logs of all package changes. Filter recent installs with:
grep "installed" /var/log/pacman.log | tail -20 - Generic system logs: Some distros or third-party installers write to
/var/log/syslogor/var/log/messages. Search for install-related keywords with:grep -i "install\|setup" /var/log/syslog | tail -20
2. Track manually installed software (source/binary)
Rpm/yum won’t track software you compiled from source or installed via standalone binaries. Try these tricks:
- Check common manual install directories for recently modified files (adjust
-7to your desired number of days):find /usr/local -type f -mtime -7/usr/localis the standard target for manual installs, so this will turn up binaries, libraries, and assets added recently. - If you kept your source code folders, sort them by modification date to see which you compiled lately:
ls -lt /path/to/your/source/directories - Pro tip: If you’re consistent about it, keeping a custom log (like
~/manual_installs.log) where you note every source/binary install will save you tons of time later.
3. Use package-agnostic tracking tools
If you used helper tools for manual installs, they might have built-in tracking:
checkinstall: If you used this instead ofmake installwhen compiling, it creates a system package that your distro’s package manager can track. List these with your distro’s tool (e.g.,dpkg -l | grep checkinstallfor Debian).stow: If you used stow to manage manual installs, list all stowed packages with:
(Replacestow -l /usr/local/stow/usr/local/stowwith your stow directory if you used a different one.)
4. Check user-specific installs
Don’t miss software installed only for your user (not system-wide):
- Check your local user directories for recent additions:
find ~/.local -type f -mtime -7 - For sandboxed apps (snap/flatpak, which are independent of rpm/yum):
- List snaps with installation dates:
snap list | awk '{print $1, $5}' | tail -20 - List flatpaks sorted by installation time:
flatpak list --columns=name,installation-time --sort=installation-time
- List snaps with installation dates:
内容的提问来源于stack exchange,提问作者BALAJI LUCKY
相关产品推荐
相关产品推荐

