On Sun, 2006-04-09 at 15:20 -0400, Dan wrote: > Paul Howarth wrote: > > On Sun, 2006-04-09 at 04:21 -0400, Dan wrote: > > > >> Jeffrey D. Yuille wrote: > >> > >>> Does anyone know the command for checking dependencies of a program > >>> before deleting it? I didn't realize that after deleting a program > >>> (in this case, wpa_supplicant), other critical programs would be > >>> deleted as well. Fortunately, I was able to replace those > >>> dependencies but would prefer to avoid this problem in the future. > >>> > >> rpm -q --requires packagename > >> > > > > That tells you what a package depends on, not what packages depend on > > it. > > > > Paul. > > > > > True. I meant rpm -q --whatrequires packagename . Though I've had odd > experiences where this command hasn't returned everything it should have. Perhaps not everything you might expect anyway. There are multiple ways a package can be a dependency, and this query only reveals one of those ways. Suppose you have a package A, which "provides" libA.so.1 and also contains the file /bin/A rpm -q --whatrequires A will only show you the packages that have an explicit dependency on A It won't show you the packages that have a dependency on libA.so.1 or the file /bin/A To get a full list of things that depend on package A, you'd need to: rpm -q --whatrequires A for everything listed by "rpm -q --provides A", do: rpm -q --whatrequires $thing for everything listed by "rpm -ql A", do: rpm -q --whatrequires $thing You'd then need to repeat that for every package named, and so on until no new packages turned up. The easiest way to find out what'll be deleted if you want to remove a package and everything that depends on it is really just to do "yum remove package" and be ready to answer "n" when prompted for confirmation. Paul. > -Dan >