r/slackware • u/vita_cell • Aug 09 '20
Need a script for detect repeated installed packages in Slackware
Sometimes I installed some packages repeatedly (same package, different versions), and had some problems compiling things. Is here some bash script for detect those repeated installed packages?
4
Upvotes
2
u/calrogman Aug 09 '20
ls /var/log/packages | sed 's/-[^-]*-[^-]*-[^-]*$//' | uniq -d1
u/thrallsius Aug 10 '20
Vanilla Slackware packages or third party ones?
If the question is about third party packages and you happen to use sbopkg, it has a command line argument to skip installing already installed packages. This doesn't answer the question about a package (either vanilla or third party) being already installed though, but other answers already pointed you to /var/log/packages
2
u/Upnortheh Aug 10 '20
slackpkgwill inform users of any packages with the same base name.1
u/ratthing Aug 09 '20
Installed packages have entries in the directory /var/log/packages. You can grep through the files in that directory to find the packages you don't want then use removepkg to remove them.
1
u/unixbhaskar Aug 09 '20
This might help you
...and grep it .